Selenium Grid: communication error with remote browser. Maybe he died

I have two machines, one with everything you need (Eclipse + TestNG + scripts), and the other with browsers installed. I am using Selenium Grid 2.35.0.

Everything seems fine, except for the problem that very often occurs with me: Error communicating with the remote browser. It may have died. Error communicating with the remote browser. It may have died.

The scripts are not complicated at all, I run them one by one, so this happens by accident. I do not think that this is because of the browser. Any idea / fix? If you need more information, I am here.

+4
source share
3 answers

The only time I get this error is when I manually close the browser myself. I would make sure that the machine works with confidence in browsers.

It can also be caused by calling driver.quit () and not instantiating another driver (I never did this, so I don’t know what error this causes)

+2
source

I also notice this error, but ONLY when using selenium mesh (now using 2.35, but 2.38)

When I run locally, I do not receive a viewing error message, but this can usually happen when there is an error with the setup and break code (perhaps one of your classes creates an instance of your browser before your setup function gets called)

0
source

See How to close a child’s browser window in Selenium WebDriver using Java

provide a call to driver.close(); on each pop-up / new Windows / New tab that you open during the test (after switching to it using driver.switchTo() )

and call driver.quit(); at the end of the session (usually in the annotated @AfterClass method)

0
source

Source: https://habr.com/ru/post/1500528/


All Articles