org.openqa.selenium.SessionNotCreatedException: session not created disconnected:unable to send message to renderer error with ChromeDriver and Chrome

后端 未结 2 1237
我在风中等你
我在风中等你 2021-01-29 12:32

I try to run this simple program on Java with Selenium:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;


public class MySe         


        
2条回答
  •  清酒与你
    2021-01-29 12:52

    This error message...

    org.openqa.selenium.SessionNotCreatedException: session not created 
    disconnected: unable to send message to renderer
    

    ...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.

    I suspect your main issue is the incompatibility between the version of the binaries you are using.

    As per the snapshot you have provided the following set of binaries you are using looks fine to me:

    • JDK: 1.8.0_191
    • Selenium: 3.14.0
    • ChromeDriver: 2.43
    • Chrome: 69.0

    Analysis & Solution

    • As per Unable to receive message from renderer error using chrome driver 2.27 another pottential reason can be presence of antivirus within your localhost which you need to disable.

    • Ensure that /etc/hosts on your system contains the following entry:

      127.0.0.1 localhost.localdomain localhost
      #or
      127.0.0.1 localhost loopback
      
    • Keep Chrome version between Chrome v68-70 levels. (as per ChromeDriver v2.43 release notes)

    • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
    • (WindowsOS only) Use CCleaner tool to wipe off all the OS chores before and after the execution of your Test Suite.
    • (LinuxOS only) Free Up and Release the Unused/Cached Memory in Ubuntu/Linux Mint before and after the execution of your Test Suite.
    • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
    • Take a System Reboot.
    • Execute your @Test.

    Reference

    You can find a related discussion in Automation Testing Error : org.openqa.selenium.WebDriverException: disconnected: unable to connect to renderer


    tl;dr

    As per ChromeDriver 2.34 doesn't wait until iframe content loads after switching into iframe this issue was also observed with ChromeDriver 2.38 and Chrome 67+ combo and was related to static iframes (part of the originally loaded DOM) which seem to work correctly even till Chrome 66.

提交回复
热议问题