Why does the Selenium Firefox Driver consider my modal not displayed when the parent has overflow:hidden?

谁都会走 提交于 2019-11-29 07:14:26

According to the Selenium WebDriver source code, an element must not have overflow: hidden as a style. (ref) (UPDATE I just realized that the maintainers have updated the code in the ref I linked to, but that the original 2.33 code did include the overflow: hidden check. Its just been refactored for presumable 2.34.)

So, it looks like unless the maintainers decide against this, you are SOL. But the first step to getting the maintainers to notice the issue is to add an Issue to the official repository, which it looks like you have done.

One possible solution in the meantime if you can't get you developers to help you is to use Javascript to remove the overflow attribute:

driver.executeScript("arguments[0].setAttribute('style', 'overflow: none;')", page_content_element)

And try to run your tests from there.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!