public class WebElementUtil
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.String |
attributeIn(java.lang.String name,
org.openqa.selenium.WebElement webElement) |
Returns a
WebElement attribute value. |
static java.util.List<java.lang.String> |
classesIn(org.openqa.selenium.WebElement webElement) |
Returns the classes in the
WebElement class attribute. |
static java.lang.String |
classIn(org.openqa.selenium.WebElement webElement) |
Returns the
WebElement class attribute. |
static boolean |
hasAttribute(java.lang.String name,
org.openqa.selenium.WebElement webElement) |
|
static boolean |
hasClass(java.lang.String className,
org.openqa.selenium.WebElement webElement) |
|
static boolean |
hasClass(org.openqa.selenium.WebElement webElement) |
|
static boolean |
hasClassContaining(java.lang.String searchText,
org.openqa.selenium.WebElement webElement) |
|
static boolean |
hasClassEndingWith(java.lang.String suffix,
org.openqa.selenium.WebElement webElement) |
|
static boolean |
hasClassMatching(java.lang.String regExp,
org.openqa.selenium.WebElement webElement) |
|
static boolean |
hasClassStartingWith(java.lang.String prefix,
org.openqa.selenium.WebElement webElement) |
|
static boolean |
hasNotAttribute(java.lang.String name,
org.openqa.selenium.WebElement webElement) |
|
static boolean |
hasNotClass(java.lang.String className,
org.openqa.selenium.WebElement webElement) |
|
static boolean |
hasNotClass(org.openqa.selenium.WebElement webElement) |
|
static boolean |
hasNotClassContaining(java.lang.String searchText,
org.openqa.selenium.WebElement webElement) |
|
static boolean |
hasNotClassEndingWith(java.lang.String suffix,
org.openqa.selenium.WebElement webElement) |
|
static boolean |
hasNotClassMatching(java.lang.String regExp,
org.openqa.selenium.WebElement webElement) |
|
static boolean |
hasNotClassStartingWith(java.lang.String prefix,
org.openqa.selenium.WebElement webElement) |
public static java.lang.String classIn(org.openqa.selenium.WebElement webElement)
WebElement class attribute.
If the WebElement does not exist in the html a
org.openqa.selenium.NoSuchElementException will be thrown.
Examples:
<input class="a-class another-class"/>
classIn(input) = "a-class another-class"
no input in html
classIn(input) throws org.openqa.selenium.NoSuchElementException
webElement - the WebElement containing a class attributepublic static java.util.List<java.lang.String> classesIn(org.openqa.selenium.WebElement webElement)
WebElement class attribute.
If the WebElement does not exist in the html a
org.openqa.selenium.NoSuchElementException will be thrown.
Examples:
<input class=" a-class another-class "/>
classesIn(input) = "a-class", "another-class"
no input in html
classIn(input) throws org.openqa.selenium.NoSuchElementException
webElement - the WebElement containing a class attributepublic static boolean hasClass(org.openqa.selenium.WebElement webElement)
public static boolean hasNotClass(org.openqa.selenium.WebElement webElement)
public static boolean hasClass(java.lang.String className,
org.openqa.selenium.WebElement webElement)
public static boolean hasNotClass(java.lang.String className,
org.openqa.selenium.WebElement webElement)
public static boolean hasClassContaining(java.lang.String searchText,
org.openqa.selenium.WebElement webElement)
public static boolean hasNotClassContaining(java.lang.String searchText,
org.openqa.selenium.WebElement webElement)
public static boolean hasClassStartingWith(java.lang.String prefix,
org.openqa.selenium.WebElement webElement)
public static boolean hasNotClassStartingWith(java.lang.String prefix,
org.openqa.selenium.WebElement webElement)
public static boolean hasClassEndingWith(java.lang.String suffix,
org.openqa.selenium.WebElement webElement)
public static boolean hasNotClassEndingWith(java.lang.String suffix,
org.openqa.selenium.WebElement webElement)
public static boolean hasClassMatching(java.lang.String regExp,
org.openqa.selenium.WebElement webElement)
public static boolean hasNotClassMatching(java.lang.String regExp,
org.openqa.selenium.WebElement webElement)
public static java.lang.String attributeIn(java.lang.String name,
org.openqa.selenium.WebElement webElement)
WebElement attribute value.
If the WebElement does not exist in the html a
org.openqa.selenium.NoSuchElementException will be thrown.
Examples:
<input title="Some title"/>
attributeIn("title", input) = "Some title"
no input in html
attributeIn("title", "input) throws org.openqa.selenium.NoSuchElementException
webElement - the WebElement containing an attribute to returnpublic static boolean hasAttribute(java.lang.String name,
org.openqa.selenium.WebElement webElement)
public static boolean hasNotAttribute(java.lang.String name,
org.openqa.selenium.WebElement webElement)
Copyright © 2017–2018 RapidPM - Vaadin Developer. All rights reserved.