public interface IElement
Modifier and Type | Method and Description |
---|---|
void |
eval(String javascript)
Implementing this method would allow to execute a javascript on the
element
|
void |
fireEvent(String event)
Implementing this method would allow for forcing an element to fire a
specific event
|
void |
focusOn()
Implementing this method would allow for the element to be brought into focus
|
String |
getAttribute(String attributeName)
Implementing this method would allow for getting an attribute of an
element
|
org.openqa.selenium.By |
getByLocator()
Implementing this method would allow for obtaining the XPath, ID, name,
CSS Selector, class name, or tag name to the element as By-Object.
|
String[] |
getChildNodesValuesText()
Implementing this method would allow for getting the text of all of this
element's child nodes
|
String |
getCssValue(String propertyName)
Implementing this method would allow for getting the CSS value given the
properties name
|
String |
getInnerHTML()
Returns inner HTML of the element
|
int |
getLocationX()
Implementing this method would allow for obtaining the X-coordinate of
the element
|
int |
getLocationY()
Implementing this method would allow for obtaining the Y-coordinate of
the element
|
String |
getLocator()
Deprecated.
getLocator is no longer reliable when IElements can be created from Bys
|
String |
getText()
Implementing this method would allow for obtaining the text of the
Element
|
org.openqa.selenium.WebElement |
getWebElement()
Implementing this method would allow for getting this element as a
WebElement
|
boolean |
hasText(String text)
Implementing this method would allow for checking to see if the element's
text contains a specific substring
|
void |
highlight()
Implementing this method would allow for highlighting this element
|
void |
highlight(String color)
Implementing this method would allow for highlighting this element a
specific color
|
boolean |
isAttributePresent(String attributeName)
Implementing this method would allow for checking if the element has a
specific attribute
|
boolean |
isElementNotPresent()
Implementing this method would allow for checking if an element is Not
present
|
boolean |
isElementNotPresent(long timeout)
Implementing this method would allow for checking if an element is Not
present within [timeout] milliseconds
|
boolean |
isElementPresent()
Implementing this method would allow for checking if an element is
present or not
|
boolean |
isElementPresent(boolean useJavaXpath)
Implementing this method would allow for checking if an element is
present or not
|
boolean |
isElementPresent(long time)
Implementing this method would allow for checking if an element is
present or not
|
boolean |
isElementVisible()
Implementing this method would allow for checking if an element is
visible or not
|
boolean |
isElementVisible(long time)
Implementing this method would allow for checking if an element is
visible or not within a designated length of time
|
boolean |
isEnabled()
Returns true if the element is enabled.
|
boolean |
isWithinBoundsOfWindow()
Implementing this method would allow for checking whether an element
is within the bounds of the window
|
void |
scrollTo()
Implementing this method would allow for the element to be scrolled to on the page
|
void |
waitForAttribute(String attributeName,
String pattern)
Waits for specific attribute value o match specific pattern within period
of maxRequestTimeout
|
void |
waitForAttribute(String attributeName,
String pattern,
long timeout)
Waits for specific attribute value to match specific pattern within
period of specified timeout
|
void |
waitForAttributeEqualTo(String attributeName,
String attributeValue)
Implementing this method would allow for keeping the test from
progressing until an element's attribute has the desired value
|
void |
waitForAttributeEqualTo(String attributeName,
String attributeValue,
long time)
Implementing this method would allow for keeping the test from
progressing until an element's attribute has the desired value by the
specified amount of time
|
void |
waitForAttributeNotEqualTo(String attributeName,
String attributeValue)
Implementing this method would allow for keeping the test from
progressing until an element's attribute no longer has the desired value
|
void |
waitForAttributeNotEqualTo(String attributeName,
String attributeValue,
long time)
Implementing this method would allow for keeping the test from
progressing until an element's attribute no longer has the desired value
by the specified amount of time
|
void |
waitForElementNotPresent()
Implementing this method would allow for the test to wait until the
element is no longer present before progressing
|
void |
waitForElementNotPresent(long time)
Implementing this method would allow for the test to wait a designated
length of time until the element is no longer present before progressing
|
void |
waitForElementPresent()
Implementing this method would allow for the test to wait until the
element is present before progressing
|
void |
waitForElementPresent(long time)
Implementing this method would allow for the test to wait a designated
length of time until the element is present before progressing
|
void |
waitForEnabled()
Waits for element to be enabled within period of maxRequestTimeout
|
void |
waitForEnabled(long time)
Waits for element to be enabled within period of specified time
|
void |
waitForNotAttribute(String attributeName,
String pattern)
Waits for specific attribute value to not match specific pattern within
period of maxRequestTimeout
|
void |
waitForNotAttribute(String attributeName,
String pattern,
long timeout)
Waits for specific attribute value not match specific pattern within
period of specified timeout
|
void |
waitForNotVisible()
Implementing this method would allow for the test to wait until the
element is no longer visible before progressing
|
void |
waitForNotVisible(long time)
Implementing this method would allow for the test to wait a designated
length of time until the element is no longer visible before progressing
|
void |
waitForText()
Implementing this method would allow for keeping the test from
progressing until an element has text
|
void |
waitForText(long time)
Implementing this method would allow for keeping the test from
progressing until an element has text
|
void |
waitForVisible()
Implementing this method would allow for the test to wait until the
element is visible before progressing
|
void |
waitForVisible(long time)
Implementing this method would allow for the test to wait until a
designated length of time the element is visible before progressing
|
String getLocator()
org.openqa.selenium.By getByLocator()
By
-Object.boolean isElementPresent() throws WidgetException
WidgetException
boolean isElementPresent(long time) throws WidgetException
time
- - the length of time this method will wait for this element to
be presentWidgetException
boolean isElementPresent(boolean useJavaXpath) throws WidgetException
useJavaXpath
- - if true, it attempts to find element using Java XPath API
and if false it attempts to find the element using the
WebDriver's APIWidgetException
boolean isElementNotPresent() throws WidgetException
WidgetException
boolean isElementNotPresent(long timeout) throws WidgetException
timeout
- MillisecondsWidgetException
boolean isElementVisible() throws WidgetException
WidgetException
boolean isElementVisible(long time) throws WidgetException
time
- - the length of time this method will wait for this element to
be presentWidgetException
boolean isWithinBoundsOfWindow() throws WidgetException
WidgetException
void waitForElementPresent() throws WidgetException, WidgetTimeoutException
void waitForElementPresent(long time) throws WidgetException, WidgetTimeoutException
time
- - the length of time this method will wait for this element to
be presentWidgetException
WidgetTimeoutException
void waitForElementNotPresent() throws WidgetException, WidgetTimeoutException
void waitForElementNotPresent(long time) throws WidgetException, WidgetTimeoutException
time
- - the length of time this method will wait for this element to
be presentWidgetException
WidgetTimeoutException
void waitForVisible() throws WidgetException, WidgetTimeoutException
void waitForVisible(long time) throws WidgetException
time
- - the length of time this method will wait for this element to
be visibleWidgetException
void waitForNotVisible() throws WidgetException, WidgetTimeoutException
void waitForNotVisible(long time) throws WidgetException
time
- - the length of time this method will wait for this element to
be not visibleWidgetException
String getText() throws WidgetException
WidgetException
boolean isAttributePresent(String attributeName) throws WidgetException
attributeName
- - the attribute that is being checked forWidgetException
String getAttribute(String attributeName) throws WidgetException
attributeName
- - the attribute that is being grabbedWidgetException
void waitForAttributeEqualTo(String attributeName, String attributeValue) throws WidgetException, WidgetTimeoutException
attributeName
- - the attribute that is having it's value waited onattributeValue
- - the value that the test waits for the attribute to haveWidgetException
WidgetTimeoutException
void waitForAttributeEqualTo(String attributeName, String attributeValue, long time) throws WidgetException, WidgetTimeoutException
attributeName
- - the attribute that is having it's value waited onattributeValue
- - the value that the test waits for the attribute to havetime
- - the length of time this method will wait for the attribute
to be equal to the desired valueWidgetException
WidgetTimeoutException
void waitForAttributeNotEqualTo(String attributeName, String attributeValue) throws WidgetException, WidgetTimeoutException
attributeName
- - the attribute that is having it's value waited onattributeValue
- - the value that the test waits for the attribute to no longer
haveWidgetException
WidgetTimeoutException
void waitForAttributeNotEqualTo(String attributeName, String attributeValue, long time) throws WidgetException, WidgetTimeoutException
attributeName
- - the attribute that is having it's value waited onattributeValue
- - the value that the test waits for the attribute to no longer
havetime
- - the length of time this method will wait for the attribute
to be no longer have to the desired valueWidgetException
WidgetTimeoutException
void waitForAttribute(String attributeName, String pattern, long timeout) throws WidgetException
attributeName
- Name of the attributepattern
- String pattern to matchtimeout
- MillisecondsWidgetException
void waitForAttribute(String attributeName, String pattern) throws WidgetException
attributeName
- Name of the attributepattern
- String pattern to matchWidgetException
void waitForNotAttribute(String attributeName, String pattern, long timeout) throws WidgetException
attributeName
- Name of the attributepattern
- String pattern to matchtimeout
- MillisecondsWidgetException
void waitForNotAttribute(String attributeName, String pattern) throws WidgetException
attributeName
- Name of the attributepattern
- String pattern to matchWidgetException
void waitForText() throws WidgetException, WidgetTimeoutException
void waitForText(long time) throws WidgetException, WidgetTimeoutException
time
- -the length of time this method will wait for the textWidgetException
WidgetTimeoutException
void waitForEnabled() throws WidgetException
WidgetException
void waitForEnabled(long time) throws WidgetException
time
- MillisecondsWidgetException
int getLocationX() throws WidgetException
WidgetException
int getLocationY() throws WidgetException
WidgetException
boolean hasText(String text) throws WidgetException
text
- - the text that is being checked forWidgetException
String getCssValue(String propertyName) throws WidgetException
propertyName
- - the property to be checkedWidgetException
void highlight() throws WidgetException
WidgetException
void highlight(String color) throws WidgetException
color
- - the color to be used when highlighting the elementWidgetException
org.openqa.selenium.WebElement getWebElement() throws WidgetException
WidgetException
boolean isEnabled() throws WidgetException
WidgetException
void fireEvent(String event) throws WidgetException
event
- - the event that this element should fireWidgetException
String[] getChildNodesValuesText() throws WidgetException
WidgetException
String getInnerHTML() throws WidgetException
WidgetException
void eval(String javascript) throws WidgetException
javascript
- the javascript code you want to executeWidgetException
void scrollTo() throws WidgetException
WidgetException
void focusOn() throws WidgetException
WidgetException
Copyright © 2018. All rights reserved.