You might actually want getCssValue() method of a WebElement. Use it
against the "display" property as argument. That's from the core
WebDriver API. I don't know if Selenium2Library implements a get CSS
value type of keyword.
In Python Selenium 2 bindings, you would call
value_of_css_property(property_name), and your mention of isDisplayed
would be called is_displayed() from the WebElement object.
On Aug 13, 11:33 am, Mohan R <
mohanraj....@gmail.com> wrote:
> Selenium2Library has the keyword "*Element Should Be Visible" *which
> according to the docs
>
> Verifies that the element identified by locator is visible. Herein, visible
>
> > means that the element is *logically *visible, not *optically *visible in
> > the current browser viewport. For example, an element that carries
> > display:none is not logically visible, so using this keyword on that
> > element would fail.
>
> But I need to verify if the element is optically visible, i.e checking on
> the *display *CSS attribute. How do I do it?
> Right now I am using *Get Element Attribute* from Selenium2Library
> I am passing it "<my_locator>@style" which returns "display : none". But I
> want the value of the display attribute. I
> tried "<my_locator>@style.display" and "<my_locator>@style:display" without
> success. How do I accomplish this?
>
> Selenium seems to have a method to do thishttp://
selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/sel...