capybara icon indicating copy to clipboard operation
capybara copied to clipboard

Popover attribute is not handled when determining visibility

Open toy opened this issue 11 months ago • 1 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.

toy avatar Mar 15 '24 17:03 toy