Package io.fluentlenium.core.action
Class MouseActions
java.lang.Object
io.fluentlenium.core.action.MouseActions
Execute actions with the mouse.
-
Constructor Summary
ConstructorDescriptionMouseActions
(org.openqa.selenium.WebDriver driver) Creates a new mouse actions. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.openqa.selenium.interactions.Actions
actions()
Get the actions object.org.openqa.selenium.interactions.Mouse
basic()
Deprecated.Use the following mapping for updating your code:click()
Clicks at the current mouse location.Clicks (without releasing) at the current mouse location.Performs a context-click at the current mouse location.Performs a double-click at the current mouse location.moveByOffset
(int xOffset, int yOffset) Moves the mouse from its current position (or 0,0) by the given offset.release()
Releases the depressed left mouse button at the current mouse location.
-
Constructor Details
-
MouseActions
public MouseActions(org.openqa.selenium.WebDriver driver) Creates a new mouse actions.- Parameters:
driver
- driver
-
-
Method Details
-
actions
protected org.openqa.selenium.interactions.Actions actions()Get the actions object.- Returns:
- actions object
-
basic
Deprecated.Use the following mapping for updating your code:Mouse.click(Coordinates)
toMouseElementActions.click()
Mouse.doubleClick(Coordinates)
toMouseElementActions.doubleClick()
Mouse.mouseDown(Coordinates)
toMouseElementActions.moveToElement()
thenMouseElementActions.clickAndHold()
Mouse.mouseUp(Coordinates)
toMouseElementActions.release()
Mouse.mouseMove(Coordinates)
toMouseElementActions.moveToElement()
Mouse.mouseMove(Coordinates, long, long)
toMouseElementActions.moveToElement(int, int)
Mouse.contextClick(Coordinates)
toMouseElementActions.contextClick()
Basic mouse operations- Returns:
- low level interface to control the mouse
-
clickAndHold
Clicks (without releasing) at the current mouse location.- Returns:
- this object reference to chain calls
- See Also:
-
Actions.clickAndHold()
-
release
Releases the depressed left mouse button at the current mouse location.- Returns:
- this object reference to chain calls
- See Also:
-
Actions.release()
-
click
Clicks at the current mouse location. Useful when combined with- Returns:
- this object reference to chain calls
- See Also:
-
Actions.click()
-
doubleClick
Performs a double-click at the current mouse location.- Returns:
- this object reference to chain calls
-
contextClick
Performs a context-click at the current mouse location.- Returns:
- this object reference to chain calls
- See Also:
-
Actions.contextClick()
-
moveByOffset
Moves the mouse from its current position (or 0,0) by the given offset. If the coordinates provided are outside the viewport (the mouse will end up outside the browser window) then the viewport is scrolled to match.- Parameters:
xOffset
- horizontal offset. A negative value means moving the mouse left.yOffset
- vertical offset. A negative value means moving the mouse up.- Returns:
- this object reference to chain calls
- See Also:
-
Actions.moveByOffset(int, int)
-