|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openqa.selenium.remote.RemoteWebElement
public class RemoteWebElement
Field Summary | |
---|---|
protected String |
id
|
protected RemoteWebDriver.RemoteMouse |
mouse
|
protected RemoteWebDriver |
parent
|
Constructor Summary | |
---|---|
RemoteWebElement()
|
Method Summary | |
---|---|
void |
clear()
If this element is a text entry element, this will clear the value. |
void |
click()
Click this element. |
boolean |
equals(Object obj)
|
protected Response |
execute(String command,
Map<String,?> parameters)
|
WebElement |
findElement(By by)
Find the first WebElement using the given method. |
protected WebElement |
findElement(String using,
String value)
|
WebElement |
findElementByClassName(String using)
|
WebElement |
findElementByCssSelector(String using)
|
WebElement |
findElementById(String using)
|
WebElement |
findElementByLinkText(String using)
|
WebElement |
findElementByName(String using)
|
WebElement |
findElementByPartialLinkText(String using)
|
WebElement |
findElementByTagName(String using)
|
WebElement |
findElementByXPath(String using)
|
List<WebElement> |
findElements(By by)
Find all elements within the current context using the given mechanism. |
protected List<WebElement> |
findElements(String using,
String value)
|
List<WebElement> |
findElementsByClassName(String using)
|
List<WebElement> |
findElementsByCssSelector(String using)
|
List<WebElement> |
findElementsById(String using)
|
List<WebElement> |
findElementsByLinkText(String using)
|
List<WebElement> |
findElementsByName(String using)
|
List<WebElement> |
findElementsByPartialLinkText(String using)
|
List<WebElement> |
findElementsByTagName(String using)
|
List<WebElement> |
findElementsByXPath(String using)
|
String |
getAttribute(String name)
Get the value of a the given attribute of the element. |
Coordinates |
getCoordinates()
|
String |
getCssValue(String propertyName)
Get the value of a given CSS property. |
String |
getId()
|
Point |
getLocation()
Where on the page is the top left-hand corner of the rendered element? |
Point |
getLocationOnScreenOnceScrolledIntoView()
Use this to discover where on the screen an element is so that we can click it. |
Dimension |
getSize()
What is the width and height of the rendered element? |
String |
getTagName()
Get the tag name of this element. |
String |
getText()
Get the visible (i.e. |
WebDriver |
getWrappedDriver()
|
int |
hashCode()
|
boolean |
isDisplayed()
Is this element displayed or not? This method avoids the problem of having to parse an element's "style" attribute. |
boolean |
isEnabled()
Is the element currently enabled or not? This will generally return true for everything but disabled input elements. |
boolean |
isSelected()
Determine whether or not this element is selected or not. |
void |
sendKeys(CharSequence... keysToSend)
Use this method to simulate typing into an element, which may set its value. |
void |
setId(String id)
|
void |
setParent(RemoteWebDriver parent)
|
void |
setSelected()
|
void |
submit()
If this current element is a form, or an element within a form, then this will be submitted to the remote server. |
boolean |
toggle()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String id
protected RemoteWebDriver parent
protected RemoteWebDriver.RemoteMouse mouse
Constructor Detail |
---|
public RemoteWebElement()
Method Detail |
---|
public void setParent(RemoteWebDriver parent)
public String getId()
public void setId(String id)
public void click()
WebElement
click
in interface WebElement
public void submit()
WebElement
submit
in interface WebElement
public void sendKeys(CharSequence... keysToSend)
WebElement
sendKeys
in interface WebElement
public void clear()
WebElement
clear
in interface WebElement
public String getTagName()
WebElement
"input"
for the element <input name="foo" />
.
getTagName
in interface WebElement
public String getAttribute(String name)
WebElement
getAttribute
in interface WebElement
name
- The name of the attribute.
public boolean toggle()
public boolean isSelected()
WebElement
isSelected
in interface WebElement
public void setSelected()
public boolean isEnabled()
WebElement
isEnabled
in interface WebElement
public String getText()
WebElement
getText
in interface WebElement
public String getCssValue(String propertyName)
WebElement
getCssValue
in interface WebElement
public List<WebElement> findElements(By by)
WebElement
findElements
in interface SearchContext
findElements
in interface WebElement
by
- The locating mechanism to use
WebElement
s, or an empty list if nothing matches.By
public WebElement findElement(By by)
WebElement
WebElement
using the given method. See the note in
WebElement.findElement(By)
about finding via XPath.
findElement
in interface SearchContext
findElement
in interface WebElement
by
- The locating mechanism
protected WebElement findElement(String using, String value)
protected List<WebElement> findElements(String using, String value)
public WebElement findElementById(String using)
findElementById
in interface FindsById
public List<WebElement> findElementsById(String using)
findElementsById
in interface FindsById
public WebElement findElementByLinkText(String using)
findElementByLinkText
in interface FindsByLinkText
public List<WebElement> findElementsByLinkText(String using)
findElementsByLinkText
in interface FindsByLinkText
public WebElement findElementByName(String using)
findElementByName
in interface FindsByName
public List<WebElement> findElementsByName(String using)
findElementsByName
in interface FindsByName
public WebElement findElementByClassName(String using)
findElementByClassName
in interface FindsByClassName
public List<WebElement> findElementsByClassName(String using)
findElementsByClassName
in interface FindsByClassName
public WebElement findElementByCssSelector(String using)
findElementByCssSelector
in interface FindsByCssSelector
public List<WebElement> findElementsByCssSelector(String using)
findElementsByCssSelector
in interface FindsByCssSelector
public WebElement findElementByXPath(String using)
findElementByXPath
in interface FindsByXPath
public List<WebElement> findElementsByXPath(String using)
findElementsByXPath
in interface FindsByXPath
public WebElement findElementByPartialLinkText(String using)
findElementByPartialLinkText
in interface FindsByLinkText
public List<WebElement> findElementsByPartialLinkText(String using)
findElementsByPartialLinkText
in interface FindsByLinkText
public WebElement findElementByTagName(String using)
findElementByTagName
in interface FindsByTagName
public List<WebElement> findElementsByTagName(String using)
findElementsByTagName
in interface FindsByTagName
protected Response execute(String command, Map<String,?> parameters)
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public WebDriver getWrappedDriver()
getWrappedDriver
in interface WrapsDriver
public boolean isDisplayed()
WebElement
isDisplayed
in interface WebElement
public Point getLocation()
WebElement
getLocation
in interface WebElement
public Dimension getSize()
WebElement
getSize
in interface WebElement
public Point getLocationOnScreenOnceScrolledIntoView()
Locatable
getLocationOnScreenOnceScrolledIntoView
in interface Locatable
public Coordinates getCoordinates()
getCoordinates
in interface Locatable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |