|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbr.eti.kinoshita.selenium.util.Utils
public class Utils
Utility methods. Most of these methods were found on Internet and implemented here while Selenium latest version was 2.0b3. Probably some of them might be deprecated or will be in some near future. Hopefully Selenium API will grow and become much nicer, making most if not all, of these methods useless.
// TBD: Review which methods could be replaced/removed/enhanced.
| Method Summary | |
|---|---|
static void |
clickAndWaitForElementAttributeChange(org.openqa.selenium.WebElement elementToClick,
String attributeType,
String attributeValue)
Click on a WebElement as many times are necessary checking if some attribute value has changed |
static void |
clickAndWaitForElementToDesappear(org.openqa.selenium.WebElement elementToClick)
Click on some WebElement as many times are necessary checking if it desappeared |
static void |
executeJavascript(org.openqa.selenium.WebDriver driver,
String jsCommand)
Execute a javascript command |
static void |
executeJavascriptClick(org.openqa.selenium.WebDriver driver,
String elementID)
Execute the javascript onclick event |
static void |
executeJavascriptClickIE(org.openqa.selenium.WebDriver driver,
String elementID)
|
static com.google.common.base.Function<org.openqa.selenium.WebDriver,org.openqa.selenium.WebElement> |
presenceOfElement(org.openqa.selenium.By locator)
|
static com.google.common.base.Function<org.openqa.selenium.WebDriver,org.openqa.selenium.support.ui.Select> |
presenceOfSelectIndexAvailable(org.openqa.selenium.By locator,
int index)
|
static void |
selectRadioButton(org.openqa.selenium.WebElement radioToClick)
Select radio button |
static void |
sleep(Long timeToSleep)
Make actual thread sleep for X mili-seconds |
static org.openqa.selenium.WebElement |
waitForAssyncContent(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.By by,
Long timeout)
Wait for assync content in a determined period |
static void |
waitForSelectIndex(org.openqa.selenium.support.ui.Select select,
Integer index,
Long timeout)
Wait for determined select index in a select (combo) box in a determined period |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static com.google.common.base.Function<org.openqa.selenium.WebDriver,org.openqa.selenium.WebElement> presenceOfElement(org.openqa.selenium.By locator)
public static com.google.common.base.Function<org.openqa.selenium.WebDriver,org.openqa.selenium.support.ui.Select> presenceOfSelectIndexAvailable(org.openqa.selenium.By locator,
int index)
public static void executeJavascript(org.openqa.selenium.WebDriver driver,
String jsCommand)
driver - jsCommand -
public static org.openqa.selenium.WebElement waitForAssyncContent(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.By by,
Long timeout)
throws org.openqa.selenium.NoSuchElementException
driver - Selenium web driver.by - Selenium By expression.timeout - Selenium time out.
org.openqa.selenium.NoSuchElementException
public static void waitForSelectIndex(org.openqa.selenium.support.ui.Select select,
Integer index,
Long timeout)
select - index - timeout -
public static void executeJavascriptClick(org.openqa.selenium.WebDriver driver,
String elementID)
driver - elementID -
public static void executeJavascriptClickIE(org.openqa.selenium.WebDriver driver,
String elementID)
public static void sleep(Long timeToSleep)
timeToSleep -
public static void clickAndWaitForElementAttributeChange(org.openqa.selenium.WebElement elementToClick,
String attributeType,
String attributeValue)
elementToClick - attributeType - attributeValue - public static void clickAndWaitForElementToDesappear(org.openqa.selenium.WebElement elementToClick)
elementToClick - public static void selectRadioButton(org.openqa.selenium.WebElement radioToClick)
radioToClick -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||