ericmckean / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

Wrong Exception for Unclickable Element #929

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The clickable error is explained in the common issues section.

If the reason an element isn't clickable is because the element has moved, it 
is a stale element, and should be reported as a StaleElementReferenceError. 

Currently Selenium is returning this: Selenium::WebDriver::Error::UnknownError 

Regardless of which reason for the unclickable error, it is obviously a known 
issue and should have a more meaningful exception.

I shouldn't have to rescue all UnknownErrors on every click in case this 
particular known and common chrome-specific problem happens.

Original issue reported on code.google.com by titusfor...@gmail.com on 9 Oct 2014 at 5:25

GoogleCodeExporter commented 9 years ago
The WebDriver spec has a note that recommends an 'element not visible' response 
in this case:

NOTE
As the goal is to emulate users as closely as possible, the implementation 
should not allow clicking on elements that are obscured by other elements. If 
the implementation forbids clicking on obscured elements, an element not 
visible response must be returned and this should have an explantory message 
explaining the reason. The implementation should try to scroll the element into 
view, but in case it is fully obscured, it should not be clickable.

  https://dvcs.w3.org/hg/webdriver/raw-file/tip/webdriver-spec.html#clicking

Original comment by jari.bakken on 9 Oct 2014 at 6:06

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:18