public class KeyboardActions extends Object
| Constructor and Description |
|---|
KeyboardActions(org.openqa.selenium.interactions.Keyboard keyboard,
org.openqa.selenium.interactions.Mouse mouse)
Creates a new object to execute actions with the keyboard, using given selenium Keyboard and Mouse interfaces.
|
KeyboardActions(org.openqa.selenium.WebDriver driver)
Creates a new object to execute actions with the keyboard, using given selenium driver.
|
| 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
|
KeyboardActions |
keyDown(org.openqa.selenium.Keys theKey)
Performs a modifier key press.
|
KeyboardActions |
keyUp(org.openqa.selenium.Keys theKey)
Performs a modifier key release.
|
KeyboardActions |
sendKeys(CharSequence... keysToSend)
Sends keys to the active element.
|
public KeyboardActions(org.openqa.selenium.WebDriver driver)
driver - selenium driverpublic KeyboardActions(org.openqa.selenium.interactions.Keyboard keyboard,
org.openqa.selenium.interactions.Mouse mouse)
keyboard - keyboard interfacemouse - mouse interfaceprotected org.openqa.selenium.interactions.Actions actions()
public org.openqa.selenium.interactions.Keyboard basic()
public KeyboardActions 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.Actions.keyDown(Keys)public KeyboardActions keyUp(org.openqa.selenium.Keys theKey)
theKey - Either Keys.SHIFT, Keys.ALT or Keys.CONTROL.Actions.keyUp(Keys)public KeyboardActions sendKeys(CharSequence... keysToSend)
WebElement.sendKeys(CharSequence...) on the active element in two ways:
keysToSend - The keys.Actions.sendKeys(CharSequence...)Copyright © 2016 FluentLenium. All Rights Reserved.