【Selenium异常】WebDriverException
来源:互联网 发布:linux程序权限 编辑:程序博客网 时间:2024/06/02 06:49
异常类
org.openqa.selenium.WebDriverException
异常信息
org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (255, 575) (Session info: chrome=60.0.3112.113) (Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Windows NT 6.1.7600 x86_64) (WARNING: The server did not provide any stacktrace information)Command duration or timeout: 249 millisecondsBuild info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'System info: host: '***', ip: '***', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_77'Driver info: org.openqa.selenium.remote.RemoteWebDriverCapabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8), userDataDir=C:\Users\Think\AppData\Local\Temp\scoped_dir35164_16594}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=60.0.3112.113, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=}]Session ID: 73b0eb77cee85d6c901ce4cb459daa9c at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_77] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_77] ...
或者
org.openqa.selenium.WebDriverException: unknown error: Element <a ui-sref="loanTrialDetail({type:'audit',id:'20170801090014C6A92B6B765411E7905BFA163E034260'})" class="btn btn-outline btn-circle btn-sm red" href="#/loan_trial_detail/audit/20170801090014C6A92B6B765411E7905BFA163E034260">...</a> is not clickable at point (1200, 41). Other element would receive the click: <a href="#" class="dropdown-toggle" dropdown-menu-hover="" data-toggle="dropdown" data-close-others="true" aria-haspopup="true" aria-expanded="false">...</a> (Session info: chrome=60.0.3112.113) (Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Windows NT 6.1.7600 x86_64) (WARNING: The server did not provide any stacktrace information)Command duration or timeout: 230 millisecondsBuild info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'System info: host: '***', ip: '***', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_77'Driver info: org.openqa.selenium.remote.RemoteWebDriverCapabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8), userDataDir=C:\Users\Think\AppData\Local\Temp\scoped_dir33688_30564}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=60.0.3112.113, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=}]Session ID: 1a91284ce6e7c0ef6ca6adcc29d53091 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_77] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_77] ...
要点击的元素被其他元素全部或部分覆盖
解决方案:
(1)滚动窗口到该元素所在位置后再进行点击,参考Selenium之滚动。需要说明的一点是,这里使用Actions类进行滚动可能无法解决该问题,建议使用Element.scrollIntoView()
或window.scrollTo(x,y)
。
(2)修改定位路径,选择其他也可实现点击效果的元素路径替换原来的路径。比如我遇到的问题中使用By.xpath("//span[text()='»']")
代替By.xpath("//span[text()='»']//parent::li")
后问题解决。具体原因,暂且未明。
阅读全文
0 0
- 【Selenium异常】WebDriverException
- selenium报WebDriverException错误
- Selenium python 启动firefox浏览器的异常selenium.common.exceptions.WebDriverException: Message: 'geckodriver'
- Python selenium.common.exceptions.WebDriverException
- selenium.common.exceptions.WebDriverException: Message: "Can't load the profile.
- 处理使用selenium模块时常见的WebdriverException
- selenium.common.exceptions.WebDriverException: Message: Service chromium-browser unexpectedly exited
- 【已解决】:selenium.common.exceptions.WebDriverException: Message: 'geckodriver' ...
- selenium.common.exceptions.WebDriverException: Message: Missing 'type' parameter
- selenium:org.openqa.selenium.WebDriverException: f.QueryInterface is not a function
- docker selenium环境运行python脚本时候,出现selenium.common.exceptions.WebdriverException:Message:None
- Python 中selenium模块报错selenium.common.exceptions.WebDriverException: Message: 'chromedriver'
- org.openqa.selenium.WebDriverException: Component returned failure code: 0x80004005 (NS_ERROR_FAILUR
- selenium2.0中 InternetExplorerDriver报错问题解决方法org.openqa.selenium.WebDriverException: Unexpected error
- Fixing “selenium.common.exceptions.WebDriverException: Message: ‘Can\’t load the profile.”
- org.openqa.selenium.WebDriverException: unknown error: Compound class names not permitted
- selenium问题六:上传文件报错WebDriverException: Message: '{"value" : "Command not found:
- http://stackoverflow.com/questions/39998330/selenium-common-exceptions-webdriverexception-message-se
- java基础,转载
- 删除SVN/CVS/Git目录的bat脚本
- p标签下输入数字不能自动换行的解决方法
- jsp的命名细则
- git命令
- 【Selenium异常】WebDriverException
- Linux创建子账户并设置使用秘钥登录
- 数据清洗及OpenRefine工具
- AI时代-人工智能入学指南
- 互联网+、发展物联网、拥抱智慧农业大市场
- 不用加减乘除做加法
- ionic 的ion-header-bar隐藏
- 函数指针一例分析
- CS50 2016 Week 8 学习笔记