public class MouseAndKeyboard extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.openqa.selenium.WebDriver |
driver
The driver.
|
| Constructor and Description |
|---|
MouseAndKeyboard(org.openqa.selenium.WebDriver driver)
Instantiates a new mouse and keyboard.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
moveToElement(org.openqa.selenium.WebElement element)
Move to element.
|
static void |
moveToElementAndSelectItem(org.openqa.selenium.WebElement menuElement,
org.openqa.selenium.WebElement menuItem)
Move to element and select item.
|
static void |
scrollDown(String yValue)
Scroll down.
|
static void |
scrollToElementViaCordinate(org.openqa.selenium.WebElement element)
Scroll to element via cordinate.
|
static void |
scrollToElementViaJavascript(org.openqa.selenium.WebElement element)
Scroll to element via javascript.
|
static void |
scrollup(String xValue)
Scrollup.
|
public MouseAndKeyboard(org.openqa.selenium.WebDriver driver)
driver - the driverpublic static void scrollup(String xValue) throws Exception
xValue - the x value. Ex:"500"Exceptionpublic static void scrollDown(String yValue) throws Exception
yValue - the y value. Ex:"500"Exceptionpublic static void scrollToElementViaJavascript(org.openqa.selenium.WebElement element)
throws Exception
element - the elementExceptionpublic static void scrollToElementViaCordinate(org.openqa.selenium.WebElement element)
throws Exception
element - the elementException - the exceptionpublic static void moveToElement(org.openqa.selenium.WebElement element)
element - the elementpublic static void moveToElementAndSelectItem(org.openqa.selenium.WebElement menuElement,
org.openqa.selenium.WebElement menuItem)
throws InterruptedException
menuElement - the menu elementmenuItem - the menu itemInterruptedException - the interrupted exception