public final class SeleniumWComponentsUtil extends Object
Utility class containing convenience methods for testing WComponents with Selenium.
Logic has been extracted into this utility class for any consumers who cannot extend WComponentSeleniumTestCase due to a different test class hierarchy.
| Modifier and Type | Method and Description |
|---|---|
static void |
configureDriver(org.openqa.selenium.WebDriver driver)
Configure the WebDriver with the standard WComponents configuration.
|
static SeleniumWDialogWebElement |
getDialog(org.openqa.selenium.WebDriver driver)
Get the screen's dialog, whether it is open or not.
|
static org.openqa.selenium.support.ui.ExpectedCondition<Boolean> |
getPageReadyCondition()
Get the ExpectedCondition for waiting for the WComponents page to be ready.
|
static boolean |
isOpenDialog(org.openqa.selenium.WebDriver driver)
Is there an open dialog on the screen?
|
static void |
waitForPageReady(org.openqa.selenium.WebDriver driver)
Wait for the page to have loaded, including all AJAX and JavaScript.
|
static void |
waitForPageReady(org.openqa.selenium.WebDriver driver,
int timeoutSeconds,
long pollingMilliseconds)
Wait for the page to have loaded, including all AJAX and JavaScript.
|
public static void configureDriver(org.openqa.selenium.WebDriver driver)
driver - the WebDriver to configure.public static void waitForPageReady(org.openqa.selenium.WebDriver driver)
driver - the WebDriver.public static void waitForPageReady(org.openqa.selenium.WebDriver driver,
int timeoutSeconds,
long pollingMilliseconds)
driver - the WebDriver.timeoutSeconds - - the number of seconds after which the 'wait' will time out.pollingMilliseconds - - the number of milliseconds to wait between each poll attempt.public static boolean isOpenDialog(org.openqa.selenium.WebDriver driver)
driver - the WebDriver.public static SeleniumWDialogWebElement getDialog(org.openqa.selenium.WebDriver driver)
driver - the WebDriver.public static org.openqa.selenium.support.ui.ExpectedCondition<Boolean> getPageReadyCondition()
Copyright © 2016. All rights reserved.