Capybara Selenium Chrome打开关于Google Chrome
我在Chrome中进行测试时遇到问题.当我运行测试时,它会在新标签页中打开chrome://settings/help页面.这导致我的测试失败,因为它找不到应该单击的按钮.看到发生了什么事,我正在以正常模式在Chrome中进行调试.
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?
今天早上,我遇到了同样的问题.我们所有的测试都失败了,因为运行硒测试时chrome://settings/help
是自动打开的.
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.
当我们使用Chrome 61时并没有发生这种情况,并且在将其更新为Chrome 62时突然出现了.
This behaviour did not happen when we used Chrome 61, and suddenly appeared when it got updated to Chrome 62.
为了解决此问题,我们必须将chromedriver
二进制文件更新为最新版本.您可以在此处 https://chromedriver.storage.googleapis.com/index.html
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.