public class BrowserDialogHelper extends Object
| Constructor and Description |
|---|
BrowserDialogHelper() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
click(org.openqa.selenium.WebDriver driver,
SeleniumLocatorParser.WebElementSelector parsedLocator)
Will try to click a browser dialog button in the following conditions:
If locator is any of: 'dialog', 'alert', 'dialog=confirm' or 'dialog=cancel'.
|
boolean |
present(org.openqa.selenium.WebDriver driver,
SeleniumLocatorParser.WebElementSelector parsedLocator) |
String |
text(org.openqa.selenium.WebDriver driver,
SeleniumLocatorParser.WebElementSelector parsedLocator) |
public boolean click(org.openqa.selenium.WebDriver driver,
SeleniumLocatorParser.WebElementSelector parsedLocator)
NoAlertPresentException will be thrownSeleniumLocatorParser.ByFocus and there is an alert present. If dialog contains 'confirm' and 'cancel' buttons, 'confirm' will be clickeddriver - instance of WebDriver to manipulate dialogparsedLocator - instance of SeleniumLocatorParser.WebElementSelector containing locator contextorg.openqa.selenium.NoAlertPresentException - if locator prefix is 'dialog' or 'alert' and there is no alert presentpublic String text(org.openqa.selenium.WebDriver driver, SeleniumLocatorParser.WebElementSelector parsedLocator)
public boolean present(org.openqa.selenium.WebDriver driver,
SeleniumLocatorParser.WebElementSelector parsedLocator)
Copyright © 2018. All rights reserved.