Search in sources :

Example 1 with SeleniumWDialogWebElement

use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWDialogWebElement in project wcomponents by BorderTech.

the class SeleniumWComponentsUtil method getDialog.

/**
 * Get the screen's dialog, whether it is open or not.
 *
 * @param driver the WebDriver.
 *
 * @return a WDialogWebElement for the dialog.
 */
public static SeleniumWDialogWebElement getDialog(final WebDriver driver) {
    By by = By.cssSelector(SeleniumWDialogWebElement.getOpenDialogCssSelector());
    WebElement dialog = findElementImmediateForDriver(driver, by);
    return dialog == null ? null : new SeleniumWDialogWebElement(dialog, driver);
}
Also used : By(org.openqa.selenium.By) SeleniumWDialogWebElement(com.github.bordertech.wcomponents.test.selenium.element.SeleniumWDialogWebElement) SeleniumWTextFieldWebElement(com.github.bordertech.wcomponents.test.selenium.element.SeleniumWTextFieldWebElement) WebElement(org.openqa.selenium.WebElement) SeleniumWTextAreaWebElement(com.github.bordertech.wcomponents.test.selenium.element.SeleniumWTextAreaWebElement) SeleniumWCheckBoxWebElement(com.github.bordertech.wcomponents.test.selenium.element.SeleniumWCheckBoxWebElement) SeleniumWComponentWebElement(com.github.bordertech.wcomponents.test.selenium.element.SeleniumWComponentWebElement) SeleniumWDialogWebElement(com.github.bordertech.wcomponents.test.selenium.element.SeleniumWDialogWebElement) SeleniumWRadioButtonWebElement(com.github.bordertech.wcomponents.test.selenium.element.SeleniumWRadioButtonWebElement) SeleniumWComponentInputWebElement(com.github.bordertech.wcomponents.test.selenium.element.SeleniumWComponentInputWebElement) SeleniumWEmailFieldWebElement(com.github.bordertech.wcomponents.test.selenium.element.SeleniumWEmailFieldWebElement) SeleniumWSelectWebElement(com.github.bordertech.wcomponents.test.selenium.element.SeleniumWSelectWebElement)

Aggregations

SeleniumWCheckBoxWebElement (com.github.bordertech.wcomponents.test.selenium.element.SeleniumWCheckBoxWebElement)1 SeleniumWComponentInputWebElement (com.github.bordertech.wcomponents.test.selenium.element.SeleniumWComponentInputWebElement)1 SeleniumWComponentWebElement (com.github.bordertech.wcomponents.test.selenium.element.SeleniumWComponentWebElement)1 SeleniumWDialogWebElement (com.github.bordertech.wcomponents.test.selenium.element.SeleniumWDialogWebElement)1 SeleniumWEmailFieldWebElement (com.github.bordertech.wcomponents.test.selenium.element.SeleniumWEmailFieldWebElement)1 SeleniumWRadioButtonWebElement (com.github.bordertech.wcomponents.test.selenium.element.SeleniumWRadioButtonWebElement)1 SeleniumWSelectWebElement (com.github.bordertech.wcomponents.test.selenium.element.SeleniumWSelectWebElement)1 SeleniumWTextAreaWebElement (com.github.bordertech.wcomponents.test.selenium.element.SeleniumWTextAreaWebElement)1 SeleniumWTextFieldWebElement (com.github.bordertech.wcomponents.test.selenium.element.SeleniumWTextFieldWebElement)1 By (org.openqa.selenium.By)1 WebElement (org.openqa.selenium.WebElement)1