teamcapybara / capybara

Acceptance test framework for web applications

Home Page:http://teamcapybara.github.io/capybara/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Popover attribute is not handled when determining visibility

toy opened this issue · comments

Meta

Capybara Version: 3.40.0
Driver Information (and browser if relevant): selenium-webdriver 4.18.1 with Chrome 121.0.6167.85

Expected Behavior

I was testing interaction with buttons that are in an element with popover attribute which is inside an element with overflow hidden. After making the popover visible, it is still not possible to interact with the button despite it being visible. isDisplayed doesn't have anything related to popover attribute. Selenium apparently also doesn't handle popover attribute, so even if isDisplayed is modified to handle it, trying to click the button gives Selenium::WebDriver::Error::ElementNotInteractableError.

HTML to show the problem:

<div style="position: relative; overflow: hidden;">
  <button popovertarget="show">Show popover</button>
  <button style="position: absolute; top: 30px;">Can not be clicked</button>
  <button popover id="show" style="position: absolute; top: 60px;">Should be clickable</button>
</div>

After clicking the «Show popover»:
image

It should not be possible to click the «Can not be clicked» button, but it should be possible to click the «Should be clickable» button.

Actual Behavior

It is not possible to click the «Should be clickable» button.

Maybe the way to handle popover attribute: ece5af4

Visibility handled via #2759