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.

Default Asked on August 21, 2014 in Selenium WebDriver.
Add Comment
  • 2 Answer(s)

    Hi Santosh,

    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();
    profile.setPreference(“webdriver.log.file”, “c:\\temp\\firefox.log”);
    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.


    Professor Answered on August 21, 2014.
    Add Comment

    Please go throw  this link



    Train Answered on August 21, 2014.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.