Capybara Selenium Chrome opens About Google Chrome

半世苍凉 提交于 2019-12-10 13:14:11

问题


I have an issue with testing in Chrome. When I run the test it opens the chrome://settings/help page in a new tab. This causes my tests to fail as it can't find the buttons it should click on. I was debugging in Chrome in normal mode when I saw what happend.

Can I prevent this from happening? Or can I keep the tab where I'm testing in focussed in some way?


回答1:


I ran into the same issue this morning. All our tests were failing because chrome://settings/help was automatically opened when we ran our selenium tests.

This behaviour did not happen when we used Chrome 61, and suddenly appeared when it got updated to Chrome 62.

In order to fix that we had to update the chromedriver binary to the latest version. You can find the drivers on here https://chromedriver.storage.googleapis.com/index.html

Our tests are now running normally again.




回答2:


To add to Germain's comment, since I had a hard time remembering how to update the chromedriver -- I'm on a mac and originally installed it using brew, so now I had to do a 'brew upgrade chromedriver'. Also probably a good idea to restart spring if you're using that for your tests.




回答3:


if anyone using this chromedriver-helper. Then update the chromedriver as mentioned here. I updated to 2.33 and error is solved.



来源:https://stackoverflow.com/questions/46805148/capybara-selenium-chrome-opens-about-google-chrome

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