public class KeyboardElementActions extends Object
| Constructor and Description |
|---|
KeyboardElementActions(org.openqa.selenium.interactions.Keyboard keyboard,
org.openqa.selenium.interactions.Mouse mouse,
org.openqa.selenium.WebElement element)
Creates a new object to execute actions with the keyboard, using selenium Keyboard and Mouse interfaces and element.
|
KeyboardElementActions(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element)
Creates a new object to execute actions with the keyboard, using given selenium driver and element.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.openqa.selenium.interactions.Actions |
actions()
Get selenium interactions actions.
|
org.openqa.selenium.interactions.Keyboard |
basic()
Basic keyboard operations
|
KeyboardElementActions |
keyDown(org.openqa.selenium.Keys theKey)
Performs a modifier key press after focusing on an element.
|
KeyboardElementActions |
keyUp(org.openqa.selenium.Keys theKey)
Performs a modifier key release after focusing on an element.
|
KeyboardElementActions |
sendKeys(CharSequence... keysToSend)
Sends keys to the active element.
|
public KeyboardElementActions(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element)
driver - selenium driverelement - element on which to execute actionspublic KeyboardElementActions(org.openqa.selenium.interactions.Keyboard keyboard,
org.openqa.selenium.interactions.Mouse mouse,
org.openqa.selenium.WebElement element)
keyboard - keyboard interfacemouse - mouse interfaceelement - element on which to execute actionsprotected org.openqa.selenium.interactions.Actions actions()
public org.openqa.selenium.interactions.Keyboard basic()
public KeyboardElementActions keyDown(org.openqa.selenium.Keys theKey)
theKey - Either Keys.SHIFT, Keys.ALT or Keys.CONTROL. If the
provided key is none of those, IllegalArgumentException is thrown.keyDown(org.openqa.selenium.Keys),
Actions.keyDown(WebElement, Keys)public KeyboardElementActions keyUp(org.openqa.selenium.Keys theKey)
theKey - Either Keys.SHIFT, Keys.ALT or Keys.CONTROL.Actions.keyUp(WebElement, Keys)public KeyboardElementActions sendKeys(CharSequence... keysToSend)
WebElement.sendKeys(CharSequence...) on the active element in two ways:
keysToSend - The keys.Actions.sendKeys(WebElement, CharSequence...)Copyright © 2016 FluentLenium. All Rights Reserved.