org.openqa.selenium.SessionNotCreatedException: session not created exception

前端 未结 9 1274
自闭症患者
自闭症患者 2020-12-08 20:25

I\'m trying to run some Selenium tests using the ChromeDriver, and I started getting this error:

Starting ChromeDriver 2.23.409699 (49b0fa931cda1caad0ae15b7d         


        
相关标签:
9条回答
  • 2020-12-08 21:10

    A few things to bare in mind for these type of cases:

    • Disable browsers auto update - at least on your slaves to avoid these type of breaking your CI process. Link for how to on Chrome, and be sure to watch these settings on the installation.
    • Versioning is the first thing to check with Selenium when it breaks all of a sudden. See notes for version compatibility.
    • I'm using my own Maven plugin to check compatibility between chromedriver and Chrome version

    Hope it helps...

    0 讨论(0)
  • 2020-12-08 21:12

    You will get this error when your code looks like below:

    WebDriver driver = new ChromeDriver();
    System.setProperty("webdriver.chrome.driver", "C:\\driver\\chromedriver.exe");
    

    You have to setProperty first and then create driver instance next

    System.setProperty("webdriver.chrome.driver", "C:\\driver\\chromedriver.exe");
    WebDriver driver = new ChromeDriver();
    
    0 讨论(0)
  • 2020-12-08 21:15

    You might need to set in /etc/hosts

    127.0.0.1  localhost
    
    0 讨论(0)
提交回复
热议问题