[webdriver] org.openqa.selenium.ElementNotVisibleException: You may not click an element that is not displayed - only in Internet Explorer

386 views
Skip to first unread message

IanE

unread,
Apr 30, 2010, 7:20:17 AM4/30/10
to webdriver
I'm trying to click on a simple link using find(By.linktext("Fund
Information").click() The link HTML itself is:

<li>
<a href="/list/funds.html">Fund Information</a>
</li>

and this works fine in Firefox but I get the error

org.openqa.selenium.ElementNotVisibleException: You may not click an
element that is not displayed

when I run it with Internet Explorer, is this a common issue? Is
there something I need to change in the page HTML so IE can see it, or
do I need to search for the element differently in the code? I've
read a couple of comments about how elements need to be visible etc,
the element's CSS is as follows, by the way (copied from the 'computed
styles' section from Chrome):

color: #555;
cursor: auto;
display: block;
height: 16px;
padding-bottom: 7px;
padding-left: 35px;
padding-right: 25px;
padding-top: 7px;
text-decoration: none;
width: 119px;
zoom: 1;

--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.

Danny Guerrier

unread,
Apr 30, 2010, 8:52:23 AM4/30/10
to webd...@googlegroups.com
Is the link you're trying to click bellow the fold of the browser? I
have many issues where the IE driver is unable to scroll down and
click an item, especially when frames are involved.
Try using the javascriptexecutor to scroll the browser down before
clicking.

Simon Stewart

unread,
Apr 30, 2010, 11:25:53 AM4/30/10
to webd...@googlegroups.com
Are any of these "many issues" easy to replicate on a public site? I'm
keen to improve the quality of the IE driver if you're running into
issues :)

Simon

Danny Guerrier

unread,
Apr 30, 2010, 12:08:44 PM4/30/10
to webd...@googlegroups.com
I'll see if i can get you a repro.

pna...@gmail.com

unread,
Apr 30, 2010, 1:13:33 PM4/30/10
to webd...@googlegroups.com
This is the issue with using linktext to find the element. I had seen it past.
Sent from my BlackBerry® wireless device
Reply all
Reply to author
Forward
0 new messages