com.codeborne.selenide
Class DOM
java.lang.Object
com.codeborne.selenide.DOM
public class DOM
- extends java.lang.Object
Constructor Summary |
DOM()
|
Method Summary |
static org.openqa.selenium.WebElement |
assertElement(org.openqa.selenium.By selector,
Condition condition)
|
static org.openqa.selenium.WebElement |
assertHidden(org.openqa.selenium.By selector)
Method fails if element does not exists. |
static org.openqa.selenium.WebElement |
assertVisible(org.openqa.selenium.By selector)
|
static void |
click(org.openqa.selenium.By by)
|
static void |
click(org.openqa.selenium.By by,
int index)
|
static java.lang.String |
describeElement(org.openqa.selenium.WebElement element)
|
static java.lang.Object |
executeJavaScript(java.lang.String jsCode)
|
protected static boolean |
existsAndVisible(org.openqa.selenium.By logoutLink)
Deprecated. |
void |
followLink(org.openqa.selenium.By by)
|
static org.openqa.selenium.WebElement |
getElement(org.openqa.selenium.By by)
|
static java.lang.String |
getJQuerySelector(org.openqa.selenium.By seleniumSelector)
|
static java.lang.String |
getJQuerySelectorString(org.openqa.selenium.By seleniumSelector)
|
static boolean |
isVisible(org.openqa.selenium.By selector)
|
void |
scrollTo(org.openqa.selenium.By element)
It works only if jQuery "scroll" plugin is included in page being tested |
static void |
selectOption(org.openqa.selenium.By selectField,
java.lang.String value)
|
void |
selectOptionByText(org.openqa.selenium.By selectField,
java.lang.String value)
|
static void |
selectRadio(java.lang.String radioFieldId,
java.lang.String value)
|
static void |
setValue(org.openqa.selenium.By by,
java.lang.String value)
|
static void |
setValue(org.openqa.selenium.WebElement element,
java.lang.String value)
|
static void |
triggerChangeEvent(org.openqa.selenium.By by)
|
static org.openqa.selenium.WebElement |
waitFor(org.openqa.selenium.By by)
|
static org.openqa.selenium.WebElement |
waitFor(org.openqa.selenium.By by,
Condition condition)
|
static org.openqa.selenium.WebElement |
waitFor(org.openqa.selenium.By by,
Condition condition,
long milliseconds)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DOM
public DOM()
getElement
public static org.openqa.selenium.WebElement getElement(org.openqa.selenium.By by)
setValue
public static void setValue(org.openqa.selenium.By by,
java.lang.String value)
setValue
public static void setValue(org.openqa.selenium.WebElement element,
java.lang.String value)
click
public static void click(org.openqa.selenium.By by)
click
public static void click(org.openqa.selenium.By by,
int index)
triggerChangeEvent
public static void triggerChangeEvent(org.openqa.selenium.By by)
getJQuerySelector
public static java.lang.String getJQuerySelector(org.openqa.selenium.By seleniumSelector)
getJQuerySelectorString
public static java.lang.String getJQuerySelectorString(org.openqa.selenium.By seleniumSelector)
describeElement
public static java.lang.String describeElement(org.openqa.selenium.WebElement element)
executeJavaScript
public static java.lang.Object executeJavaScript(java.lang.String jsCode)
scrollTo
public void scrollTo(org.openqa.selenium.By element)
- It works only if jQuery "scroll" plugin is included in page being tested
- Parameters:
element
- HTML element to scroll to.
selectRadio
public static void selectRadio(java.lang.String radioFieldId,
java.lang.String value)
selectOption
public static void selectOption(org.openqa.selenium.By selectField,
java.lang.String value)
selectOptionByText
public void selectOptionByText(org.openqa.selenium.By selectField,
java.lang.String value)
existsAndVisible
protected static boolean existsAndVisible(org.openqa.selenium.By logoutLink)
- Deprecated.
- Not recommended! Searching of unexisting element is veeery slooooow in Selenium.
followLink
public void followLink(org.openqa.selenium.By by)
isVisible
public static boolean isVisible(org.openqa.selenium.By selector)
assertVisible
public static org.openqa.selenium.WebElement assertVisible(org.openqa.selenium.By selector)
assertHidden
public static org.openqa.selenium.WebElement assertHidden(org.openqa.selenium.By selector)
- Method fails if element does not exists.
Be aware of asserting that element does not exists - it does veeery slooowly in Selenium.
assertElement
public static org.openqa.selenium.WebElement assertElement(org.openqa.selenium.By selector,
Condition condition)
waitFor
public static org.openqa.selenium.WebElement waitFor(org.openqa.selenium.By by)
waitFor
public static org.openqa.selenium.WebElement waitFor(org.openqa.selenium.By by,
Condition condition)
waitFor
public static org.openqa.selenium.WebElement waitFor(org.openqa.selenium.By by,
Condition condition,
long milliseconds)