使用 Doctype 获取 selenium ElementNotVisibleException

发布于 2024-11-26 10:49:24 字数 337 浏览 1 评论 0原文

我正在使用selenium selenium-java-2.1.0.jar,selenium-server-standalone-2.1.0.jar 在具有 HTML 和 flash 的特定页面上。我收到

org.openqa.selenium.ElementNotVisibleException: 无法单击元素(警告:服务器未提供任何堆栈跟踪信息)**

Selenium 能够找到 webelement,但无法单击它。我观察到的是删除文档类型后 < /strong> 它开始工作得非常好。是否有任何修复,因为我无法从页面中删除文档类型声明。

I am using selenium selenium-java-2.1.0.jar, selenium-server-standalone-2.1.0.jar
On a particular page which has HTML and flash both . I am getting

org.openqa.selenium.ElementNotVisibleException: Cannot click on element (WARNING: The server did not provide any stacktrace information)**

Selenium is able to find the webelement but was not able to click on it. What I observed is after removing the doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> it started working absolutely fine. Is there any fix to it because I cannot remove doctype decaration from the page.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文