做点击操作时的错误WebDriverException: unknown error: Element is not clickable at point (958, 207).
2017-05-04 14:29
471 查看
selenium中进行点击操作时报错如下:
org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (958, 207). Other element would receive the click: <div class="ant-spin-container ant-spin-blur">...</div>
(Session info: chrome=55.0.2883.75)
(Driver info: chromedriver=2.25.426923 (0390b88869384d6eb0d5d09729679f934aab9eed),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 68 milliseconds
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
System info: host: 'PC201611061244', ip: '192.168.89.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_60'
Session ID: b2b791e785d6232c55f494e30b90ae54
Driver info: org.openqa.selenium.chrome.ChromeDriver
原因:用selenium模拟用户单击元素时,JS有一个操作鼠标悬浮的时候会对元素进行修改
解决办法:用JS来操作元素
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("arguments[0].click();",driver.findElement(By.xpath("a")));
org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (958, 207). Other element would receive the click: <div class="ant-spin-container ant-spin-blur">...</div>
(Session info: chrome=55.0.2883.75)
(Driver info: chromedriver=2.25.426923 (0390b88869384d6eb0d5d09729679f934aab9eed),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 68 milliseconds
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
System info: host: 'PC201611061244', ip: '192.168.89.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_60'
Session ID: b2b791e785d6232c55f494e30b90ae54
Driver info: org.openqa.selenium.chrome.ChromeDriver
原因:用selenium模拟用户单击元素时,JS有一个操作鼠标悬浮的时候会对元素进行修改
解决办法:用JS来操作元素
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("arguments[0].click();",driver.findElement(By.xpath("a")));
相关文章推荐
- Firefox上运行自动化测试脚本提示元素无法点击“WebDriverException: Message: Element is not clickable at point“解决方法
- unknown error: Element is not clickable at point (996, 513). Other element would re
- 25、Selenium + Python 实现 UI 自动化测试-unknown error: Element is not clickable at point (x,y)
- webdriver 报错:Element is not clickable at point (993, 61). Other element would receive the click
- webdriver 报错:Element is not clickable at point (993, 61). Other element would receive the click
- Element is not clickable at point error in chrome
- selenium webdriver:"Element is not clickable at point"
- Selenium 错误 Element is not clickable at point (x, y). Other element would receive the click
- Element is not clickable at point (1108, 190). Other element would receive the click
- Selenium定位元素提示Element is not clickable at point 第一篇
- selenium报错“Element is not clickable at point”及解决方法
- js错误:Uncaught TypeError: accept is not a function at HTMLInputElement.onclick
- JS监听事件错误:Uncaught TypeError: xx(函数名)is not a function at HTMLInputElement.onclick
- 解决chromedriver无法click element的问题:Element is not clickable at point (326, 792.5)
- 解决Selenium报错:Element is not clickable at point (x, y). Other element would receive the click
- python定位元素 报错 unknown error: Element is not clickable at point (1147, 395)
- 解决Selenium报错“Element is not clickable at point...”的四种方法
- TypeError: 'WebElement' object is not iterable
- Uncaught TypeError: XX is not a function at HTMLInputElement.onclick
- Uncaught InvalidCharacterError: Failed to execute 'setAttribute' on 'Element': '"' is not a valid at