@Component public class BrowserInteropUtilsImpl extends java.lang.Object implements BrowserInteropUtils
| Constructor and Description |
|---|
BrowserInteropUtilsImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptAlert(org.openqa.selenium.WebDriver webDriver)
Accepts a browser alert
|
void |
cancelAlert(org.openqa.selenium.WebDriver webDriver)
Cancels a browser alert
|
void |
focusOnElement(org.openqa.selenium.WebDriver webDriver,
org.openqa.selenium.WebElement element)
Deals with inconsistencies between browsers in how they focus on items
|
void |
selectFromDropDownList(org.openqa.selenium.WebDriver webDriver,
org.openqa.selenium.WebElement element,
java.lang.String selectElement)
Deals with inconsistencies between browsers in how they select items from a drop down list
|
void |
setup()
https://github.com/detro/ghostdriver/issues/20
Replace window.alert and window.confirm for PhantomJS
|
boolean |
treatElementAsHidden(org.openqa.selenium.WebDriver webDriver,
org.openqa.selenium.WebElement element,
org.openqa.selenium.JavascriptExecutor js)
|
void |
waitForAlert(org.openqa.selenium.WebDriver webDriver,
int waitDuration)
Waits for an alert
|
public boolean treatElementAsHidden(@NotNull
org.openqa.selenium.WebDriver webDriver,
@NotNull
org.openqa.selenium.WebElement element,
@NotNull
org.openqa.selenium.JavascriptExecutor js)
BrowserInteropUtilstreatElementAsHidden in interface BrowserInteropUtilswebDriver - The selenium webdriverelement - The element to checkjs - The javascript executor (which may or may not be the same object as webDriver)public void selectFromDropDownList(@NotNull
org.openqa.selenium.WebDriver webDriver,
@NotNull
org.openqa.selenium.WebElement element,
@NotNull
java.lang.String selectElement)
BrowserInteropUtilsselectFromDropDownList in interface BrowserInteropUtilswebDriver - The selenium webdriverelement - The drop down listselectElement - The item that we want to selectpublic void focusOnElement(@NotNull
org.openqa.selenium.WebDriver webDriver,
@NotNull
org.openqa.selenium.WebElement element)
BrowserInteropUtilsfocusOnElement in interface BrowserInteropUtilswebDriver - The selenium webdriverelement - The element to focus onpublic void setup()
public void waitForAlert(@NotNull
org.openqa.selenium.WebDriver webDriver,
int waitDuration)
BrowserInteropUtilswaitForAlert in interface BrowserInteropUtilswebDriver - The selenium webdriverwaitDuration - How long to wait forpublic void acceptAlert(@NotNull
org.openqa.selenium.WebDriver webDriver)
BrowserInteropUtilsacceptAlert in interface BrowserInteropUtilswebDriver - The selenium webdriverpublic void cancelAlert(@NotNull
org.openqa.selenium.WebDriver webDriver)
BrowserInteropUtilscancelAlert in interface BrowserInteropUtilswebDriver - The selenium webdriver