Example usage for Java org.openqa.selenium.interactions Actions fields, constructors, methods, implement or subclass
The text is from its open source code.
Action | build() Generates a composite action containing all actions so far, ready to be performed (and resets the internal builder state, so subsequent calls to #build() will contain fresh sequences). |
Actions | click(WebElement target) Clicks in the middle of the given element. |
Actions | click() Clicks at the current mouse location. |
Actions | clickAndHold(WebElement target) Clicks (without releasing) in the middle of the given element. |
Actions | clickAndHold() Clicks (without releasing) at the current mouse location. |
Actions | contextClick() Performs a context-click at the current mouse location. |
Actions | contextClick(WebElement target) Performs a context-click at middle of the given element. |
Actions | doubleClick(WebElement target) Performs a double-click at middle of the given element. |
Actions | doubleClick() Performs a double-click at the current mouse location. |
Actions | dragAndDrop(WebElement source, WebElement target) A convenience method that performs click-and-hold at the location of the source element, moves to the location of the target element, then releases the mouse. |
Actions | dragAndDropBy(WebElement source, int xOffset, int yOffset) A convenience method that performs click-and-hold at the location of the source element, moves by a given offset, then releases the mouse. |
Actions | keyDown(CharSequence key) Performs a modifier key press. |
Actions | keyDown(WebElement target, CharSequence key) Performs a modifier key press after focusing on an element. |
Actions | keyUp(CharSequence key) Performs a modifier key release. |
Actions | keyUp(WebElement target, CharSequence key) Performs a modifier key release after focusing on an element. |
Actions | moveByOffset(int xOffset, int yOffset) Moves the mouse from its current position (or 0,0) by the given offset. |
Actions | moveToElement(WebElement target) Moves the mouse to the middle of the element. |
Actions | moveToElement(WebElement target, int xOffset, int yOffset) Moves the mouse to an offset from the center of the element. |
Actions | pause(long pause) Performs a pause. |
Actions | pause(Duration duration) |
void | perform() A convenience method for performing the actions without calling build() first. |
Actions | release(WebElement target) Releases the depressed left mouse button, in the middle of the given element. |
Actions | release() Releases the depressed left mouse button at the current mouse location. |
Actions | sendKeys(CharSequence... keys) Sends keys to the active element. |
Actions | sendKeys(WebElement target, CharSequence... keys) Equivalent to calling: Actions.click(element).sendKeys(keysToSend). This method is different from WebElement#sendKeys(CharSequence) - see #sendKeys(CharSequence) for details how. |