org.openqa.selenium
Interface RenderedWebElement

All Superinterfaces:
SearchContext, WebElement

public interface RenderedWebElement
extends WebElement


Method Summary
 void dragAndDropBy(int moveRightBy, int moveDownBy)
          Deprecated. Use ClickAndHoldAction, MoveMouseAction and ButtonReleaseAction instead
 void dragAndDropOn(RenderedWebElement element)
          Deprecated. Use ClickAndHoldAction, MoveMouseAction and ButtonReleaseAction instead
 Point getLocation()
          Where on the page is the top left-hand corner of the rendered element?
 Dimension getSize()
          What is the width and height of the rendered element?
 java.lang.String getValueOfCssProperty(java.lang.String propertyName)
          Get the value of a given CSS property.
 boolean isDisplayed()
          Is this element displayed or not?
 
Methods inherited from interface org.openqa.selenium.WebElement
clear, click, findElement, findElements, getAttribute, getTagName, getText, getValue, isEnabled, isSelected, sendKeys, setSelected, submit, toggle
 

Method Detail

isDisplayed

boolean isDisplayed()
Is this element displayed or not? This method avoids the problem of having to parse an element's "style" attribute.

Returns:
Whether or not the element is displayed

getLocation

Point getLocation()
Where on the page is the top left-hand corner of the rendered element?

Returns:
A point, containing the location of the top left-hand corner of the element

getSize

Dimension getSize()
What is the width and height of the rendered element?

Returns:
The size of the element on the page.

dragAndDropBy

@Deprecated
void dragAndDropBy(int moveRightBy,
                              int moveDownBy)
Deprecated. Use ClickAndHoldAction, MoveMouseAction and ButtonReleaseAction instead

Drag and drop

Parameters:
moveRightBy - how much to move to the right (negative for moving left)
moveDownBy - how much to move to the bottom (negative for moving up)

dragAndDropOn

@Deprecated
void dragAndDropOn(RenderedWebElement element)
Deprecated. Use ClickAndHoldAction, MoveMouseAction and ButtonReleaseAction instead

Drag and drop this element on top of the specified element

Parameters:
element - element to be dropped on. Only RenderedElement is supported

getValueOfCssProperty

java.lang.String getValueOfCssProperty(java.lang.String propertyName)
Get the value of a given CSS property. This is probably not going to return what you expect it to unless you've already had a look at the element using something like firebug. Seriously, even then you'll be lucky for this to work cross-browser. Colour values should be returned as hex strings, so, for example if the "background-color" property is set as "green" in the HTML source, the returned value will be "#008000"

Returns:
The current, computed value of the property.


Copyright © 2011. All Rights Reserved.