Getting exception “Error communicating with the remote browser. It may have died” when I run test cases in a suite
I sometimes get the above mentioned exception when I try to run test cases in a suite. This does not happen for a particular test case. randomly I get the exception due to which remaining test cases in a suite fails . Could u please give me solution on how to fix this issue.
The session may end because of many reasons. some of them are
– You browser experiences a crash and opens up as a new process.
– Not enough resources on your system.
– Browser is busy loading a page when you try to communicate with it.
Now with the information you have gives its hard to pin point the problem. I would suggest following
1. Run the Webdriver with complete logging RemoteDriver logging. For FF you can do it this way
FirefoxProfile profile = new FirefoxProfile();
WebDriver driver = new FirefoxDriver(profile);
for others refer to our tutorial site.
2. Run your tests and look at the log trace at that instance.
3. Just paste some of the logs from nearby the time of failure and we will try to debug it together.