public class MouseElementActions
extends java.lang.Object
| Constructor and Description |
|---|
MouseElementActions(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element)
Creates a new mouse element actions.
|
| Modifier and Type | Method and Description |
|---|---|
org.openqa.selenium.interactions.Mouse |
basic()
Basic mouse operations
|
MouseElementActions |
click()
Clicks in the middle of the given element.
|
MouseElementActions |
clickAndHold()
Clicks (without releasing) in the middle of the given element.
|
MouseElementActions |
contextClick()
Performs a context-click at middle of the given element.
|
MouseElementActions |
doubleClick()
Performs a double-click at middle of the given element.
|
MouseElementActions |
dragAndDropBy(int xOffset,
int yOffset)
A convenience method that performs click-and-hold at the location of this element,
moves by a given offset, then releases the mouse.
|
MouseElementActions |
dragAndDropFrom(org.openqa.selenium.WebElement source)
A convenience method that performs click-and-hold at the location of the source element,
moves to the location of this element (target), then releases the mouse.
|
MouseElementActions |
dragAndDropTo(org.openqa.selenium.WebElement target)
A convenience method that performs click-and-hold at the location of this element (source),
moves to the location of the target element, then releases the mouse.
|
MouseElementActions |
moveToElement()
Moves the mouse to the middle of the element.
|
MouseElementActions |
moveToElement(int xOffset,
int yOffset)
Moves the mouse to an offset from the top-left corner of the element.
|
MouseElementActions |
release()
Releases the depressed left mouse button, in the middle of the given element.
|
public MouseElementActions(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element)
driver - selenium driverelement - selenium elementpublic org.openqa.selenium.interactions.Mouse basic()
public MouseElementActions clickAndHold()
Actions.clickAndHold(WebElement)public MouseElementActions release()
Invoking this action without invoking clickAndHold() first will result in
undefined behaviour.
Actions.release(WebElement)public MouseElementActions click()
Actions.click(WebElement)public MouseElementActions doubleClick()
Actions.doubleClick(WebElement)public MouseElementActions moveToElement()
Actions.moveToElement(WebElement)public MouseElementActions moveToElement(int xOffset, int yOffset)
xOffset - Offset from the top-left corner. A negative value means coordinates left from
the elementyOffset - Offset from the top-left corner. A negative value means coordinates above
the elementActions.moveToElement(WebElement, int, int)public MouseElementActions contextClick()
Actions.contextClick(WebElement)public MouseElementActions dragAndDropFrom(org.openqa.selenium.WebElement source)
source - element to emulate button down atActions.dragAndDrop(WebElement, WebElement)public MouseElementActions dragAndDropTo(org.openqa.selenium.WebElement target)
target - element to move to and release the mouse at.Actions.dragAndDrop(WebElement, WebElement)public MouseElementActions dragAndDropBy(int xOffset, int yOffset)
xOffset - horizontal move offset.yOffset - vertical move offset.Actions.dragAndDropBy(WebElement, int, int)Copyright © 2018 FluentLenium. All Rights Reserved.