类 RobotActions
- java.lang.Object
-
- tech.testnx.cah.common.browser.actions.RobotActions
-
- 所有已实现的接口:
OperateBrowser
- 直接已知子类:
RobotActionsInFullScreenModeByDriver,RobotActionsInFullScreenModeByJS,RobotActionsInMaxModeByDriver,RobotActionsInMaxModeByJS
@Experimental public abstract class RobotActions extends Object implements OperateBrowser
- 作者:
- Yun
-
-
字段概要
字段 修饰符和类型 字段 说明 protected DriverActionsdriverActionsprotected JsActionsjsActionsprotected Loggerloggerprotected Robotrobot
-
构造器概要
构造器 构造器 说明 RobotActions(org.openqa.selenium.WebDriver driver)
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 booleanexitBrowserFullscreenMode()Exit browser full screen mode by Robotprotected abstract org.openqa.selenium.PointgetBrowserLocationOnScreen()protected abstract org.openqa.selenium.DimensiongetBrowserOuterDimension()protected abstract org.openqa.selenium.DimensiongetBrowserViewPortDimension()protected abstract org.openqa.selenium.PointgetBrowserViewPortLocationOnScreen()protected abstract org.openqa.selenium.PointgetElementCenterLocationOnScreen(org.openqa.selenium.WebElement e)protected abstract org.openqa.selenium.RectanglegetElementRectOnScreen(org.openqa.selenium.WebElement e)voidmouseClick(org.openqa.selenium.WebElement e)Mouse move and click an elementvoidmouseClickStartPoint()API: Move Mouse and click browser view area (1,1)voidmouseDoubleClick(org.openqa.selenium.WebElement e)Mouse double click an element by RobotvoidmouseDragAndDrop(org.openqa.selenium.WebElement source, org.openqa.selenium.WebElement target)Drag and drop from source element to target elementvoidmouseMove(org.openqa.selenium.WebElement e)Mouse move an element center by Robot If need move to a element, need use this method.voidmouseMoveToStartPoint()API: Move Mouse to browser view area (1,1)voidmouseOver(org.openqa.selenium.WebElement e, int timeInSecond)Mouse over at an elementvoidpressOneKey(int keycode)API: Press a key on keyboard after focus on the element, the key code is referred to java.awt.event.KeyEvent classvoidpressThreeKeys(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 classvoidpressTwoKeys(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 classbooleanrequestBrowserFullScreenMode()Request browser full screen mode by Robotprotected abstract booleanswitchTargetBrowserMode()voidtakeSnapshotBrowser(Path p)voidtakeSnapshotElement(org.openqa.selenium.WebElement e, Path p)voidtakeSnapshotViewPort(Path p)
-
-
-
字段详细资料
-
logger
protected Logger logger
-
driverActions
protected DriverActions driverActions
-
jsActions
protected JsActions jsActions
-
robot
protected Robot robot
-
-
构造器详细资料
-
RobotActions
public RobotActions(org.openqa.selenium.WebDriver driver) throws AWTException- 抛出:
AWTException
-
-
方法详细资料
-
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
-
takeSnapshotViewPort
public void takeSnapshotViewPort(Path p) throws IOException
- 抛出:
IOException
-
takeSnapshotBrowser
public void takeSnapshotBrowser(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
-
-