Re: Issue 4240 in selenium: isDisplayed returns false for a visible label element

810 views
Skip to first unread message

sele...@googlecode.com

unread,
Jul 16, 2012, 8:34:35 AM7/16/12
to selenium-develope...@googlegroups.com
Updates:
Summary: isDisplayed returns false for a visible label element

Comment #2 on issue 4240 by barancev: isDisplayed returns false for a
visible label element
http://code.google.com/p/selenium/issues/detail?id=4240

(No comment was entered for this change.)

sele...@googlecode.com

unread,
Jul 23, 2012, 6:13:45 AM7/23/12
to selenium-develope...@googlegroups.com

Comment #3 on issue 4240 by hi.a...@gmail.com: isDisplayed returns false
Reproduces in FF14.0.1 also.

sele...@googlecode.com

unread,
Aug 13, 2012, 4:00:33 AM8/13/12
to selenium-develope...@googlegroups.com

Comment #4 on issue 4240 by chenxu1...@gmail.com: isDisplayed returns false
Anyone can give update on this issue, or any workaround?

Thanks

sele...@googlecode.com

unread,
Dec 24, 2012, 3:48:29 PM12/24/12
to selenium-develope...@googlegroups.com

Comment #5 on issue 4240 by illi.nai...@gmail.com: isDisplayed returns
You can try with locators. Try to get the x and Y coordinators. If you get
both X and Y as negative then it says element is not displayed. If You get
some +ve value u can confirm object is present in the page.

if(webElement.getLocation().x<0 || webElement.getLocation().y<0) then
element is not displayed. else it is displayed.

sele...@googlecode.com

unread,
May 29, 2013, 11:16:39 AM5/29/13
to selenium-develope...@googlegroups.com

Comment #6 on issue 4240 by sebbes2...@gmail.com: isDisplayed returns false
Hi, I have a similar issue with the usual suspect, InternetExplorer,
version 8. I am running Selenium-Grid tests. The test in FF runs fine, with
IE I get "org.openqa.selenium.InvalidElementStateException: Element must
not be hidden, disabled or read-only" for all my elements that are visible.
For one element I printed out the following:
formType [isDisplayed]: false
formType [isEnabled]: true
formType [X-location]: 309
formType [Y-location]: 123
formType [height]: 13
formType [width]: 197

As you can see, it has height, width, as well as x and y location; yet the
isDisplayed returns false.

My versions: Selenium(client) 2.32.0, running on WinXP (32 bit). The same
issue occurs on a Win7, 64 bit environment, also against IE 8. FF on both
Linux and Windows work fine.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

sele...@googlecode.com

unread,
Jun 12, 2013, 10:17:37 AM6/12/13
to selenium-develope...@googlegroups.com

Comment #7 on issue 4240 by Ievg...@gmail.com: isDisplayed returns false
Hi, if you know that your element have height width more than zero, you can
make conclusion that your element is displayed.

sele...@googlecode.com

unread,
Jul 4, 2013, 2:54:15 AM7/4/13
to selenium-develope...@googlegroups.com

Comment #8 on issue 4240 by songw...@gmail.com: isDisplayed returns false
Actions builder = new Actions(driver);
builder.click(element);
Action selectMultiple = builder.build();
selectMultiple.perform();

You can use this way to click visible element whose isDisplay() returns
false.

sele...@googlecode.com

unread,
Jul 22, 2013, 2:29:15 AM7/22/13
to selenium-develope...@googlegroups.com

Comment #9 on issue 4240 by anis...@gmail.com: isDisplayed returns false
for python will the equivalent be

element = ......element finder .....
action_chain = ActionChains(self.driver)
action_chain.click(element)
action_chain.perform()

if yes i was not able to click on the element for which is_displayed() is
false even though the element is visible on UI.

sele...@googlecode.com

unread,
Jul 25, 2013, 4:37:05 PM7/25/13
to selenium-develope...@googlegroups.com

Comment #10 on issue 4240 by scott.bo...@frontgatetickets.com: isDisplayed
returns false for a visible label element
http://code.google.com/p/selenium/issues/detail?id=4240

Also experiencing this problem in Firefox, but the listed workarounds are
of no use. I need to actually send keys to the displayed input. Cannot
post public link to the page in question.

Attempting to create a builder and send keys with that returns the
same 'Element not Displayed...' error.

sele...@googlecode.com

unread,
Aug 5, 2013, 9:31:04 PM8/5/13
to selenium-develope...@googlegroups.com

Comment #11 on issue 4240 by songw...@gmail.com: isDisplayed returns false
In my Web App I find such situation, you should confirm that whether there
is only one target element in DOM, when you are using findElement.

As far as I know in DOM there may be several elements that match
findElement method expression.

For example,
element=
driver.findElement(By.cssSelector("label[for='r1:0:selectTitle::content']"));

There may be two or more elements returned, however, only the first is set
to element var, and it is enabled but does not display. So you can not
perform it.

sele...@googlecode.com

unread,
Dec 23, 2013, 5:57:13 PM12/23/13
to selenium-develope...@googlegroups.com
Updates:
Status: Fixed

Comment #12 on issue 4240 by barancev: isDisplayed returns false for a
Retested with Selenium 2.39 (and FF26), the issue seems to be fixed.
Please ask for reopening if it is still actual.
Reply all
Reply to author
Forward
0 new messages