Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capybara Selenium Chrome opens About Google 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?

like image 617
Smek Avatar asked Oct 18 '17 07:10

Smek


2 Answers

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.

like image 195
Germain Avatar answered Nov 12 '22 02:11

Germain


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.

like image 34
Adam Avatar answered Nov 12 '22 03:11

Adam