类 RobotActions

    • 构造器详细资料

    • 方法详细资料

      • pressOneKey

        public void pressOneKey​(int keycode)
        API: Press a key on keyboard after focus on the element, the key code is referred to java.awt.event.KeyEvent class
      • pressTwoKeys

        public void pressTwoKeys​(int firstKeyCode,
                                 int secondKeyCode)
        API: Press the two keys on keyboard at the same time after focus on the element, the key code is referred to java.awt.event.KeyEvent class
      • pressThreeKeys

        public void pressThreeKeys​(int firstKeyCode,
                                   int secondKeyCode,
                                   int thirdKeyCode)
        API: Press the three keys on keyboard at the same time after focus on the element, the key code is referred to java.awt.event.KeyEvent class
      • mouseMoveToStartPoint

        public void mouseMoveToStartPoint()
        API: Move Mouse to browser view area (1,1)
      • switchTargetBrowserMode

        protected abstract boolean switchTargetBrowserMode()
      • getBrowserLocationOnScreen

        protected abstract org.openqa.selenium.Point getBrowserLocationOnScreen()
      • getBrowserOuterDimension

        protected abstract org.openqa.selenium.Dimension getBrowserOuterDimension()
      • getBrowserViewPortLocationOnScreen

        protected abstract org.openqa.selenium.Point getBrowserViewPortLocationOnScreen()
      • getBrowserViewPortDimension

        protected abstract org.openqa.selenium.Dimension getBrowserViewPortDimension()
      • mouseClickStartPoint

        public void mouseClickStartPoint()
        API: Move Mouse and click browser view area (1,1)
      • mouseMove

        public void mouseMove​(org.openqa.selenium.WebElement e)
        Mouse move an element center by Robot If need move to a element, need use this method.
      • getElementRectOnScreen

        protected abstract org.openqa.selenium.Rectangle getElementRectOnScreen​(org.openqa.selenium.WebElement e)
      • getElementCenterLocationOnScreen

        protected abstract org.openqa.selenium.Point getElementCenterLocationOnScreen​(org.openqa.selenium.WebElement e)
      • mouseClick

        public void mouseClick​(org.openqa.selenium.WebElement e)
        Mouse move and click an element
      • mouseDoubleClick

        public void mouseDoubleClick​(org.openqa.selenium.WebElement e)
        Mouse double click an element by Robot
      • mouseOver

        public void mouseOver​(org.openqa.selenium.WebElement e,
                              int timeInSecond)
        Mouse over at an element
      • mouseDragAndDrop

        public void mouseDragAndDrop​(org.openqa.selenium.WebElement source,
                                     org.openqa.selenium.WebElement target)
        Drag and drop from source element to target element
      • takeSnapshotElement

        public void takeSnapshotElement​(org.openqa.selenium.WebElement e,
                                        Path p)
                                 throws IOException
        抛出:
        IOException
      • requestBrowserFullScreenMode

        public boolean requestBrowserFullScreenMode()
        Request browser full screen mode by Robot
      • exitBrowserFullscreenMode

        public boolean exitBrowserFullscreenMode()
        Exit browser full screen mode by Robot