mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.12k stars 1.52k forks source link

Unable to click on <area> element containing href property #1822

Open agravka opened 3 years ago

agravka commented 3 years ago

Hi,

I'm using geckodriver 0.28.0. I got this element on my site:

<area alt="Fish" coords="2,180,72,250" href="Catalog.action?viewCategory=&amp;categoryId=FISH" shape="RECT">

When I do:

@FindBy(css = "area[alt='Fish']") private WebElement btnFishImage;

WebDriverWait webDriverWait = getWebDriverWait(); webDriverWait.until(ExpectedConditions.elementToBeClickable(btnFishImage)); btnFishImage.click();

I get error: org.openqa.selenium.ElementNotInteractableException: Element <area href="Catalog.action?viewCategory=&categoryId=FISH"> could not be scrolled into view

But when I replace click(); to sendKeys(Keys.ENTER); it works ok.

Please help.

Best regards Marta Mazurkiewicz

whimboo commented 3 years ago

Could you please attach a trace-level log from geckodriver? Read more about reporting actionable bugs in our contribution guidelines. Also a HTML sample snippet would be nice to have, given that you didn't say anything about the surrounding HTML.

whimboo commented 3 years ago

Actually there is https://bugzilla.mozilla.org/show_bug.cgi?id=1502636 for that. Also see https://github.com/w3c/webdriver/issues/1411 for a missing spec behavior.