Home > Back-end >  Chrome opens webpage and closes immediately using Selenium and Java
Chrome opens webpage and closes immediately using Selenium and Java

Time:01-02

I want to write java web automation code with selenium. Although I have added Chrome.exe to my project, the page I want does not open when I run it. It closes immediately and I don't get any errors.

enter image description here

CodePudding user response:

As what shown in the picture , the driver version is not match with the browser version, I think the solution is : Update your chrome browser or download the right verion of the driver from the below url : https://sites.google.com/chromium.org/driver/home

CodePudding user response:

As per the snapshot your main issue is the incompatibility between the version of the binaries you are using as follows:

  • Your JDK version 1.8.0_201 is old and ancient.
  • You are using chromedriver=97.0.4692.36
  • Release Notes of chromedriver=97.0.4692.36 clearly mentions the following :

Supports Chrome version 97

Supports Chrome version 96

So there is a clear mismatch between chrome=96.0.4664.110 and the chromedriver=97.0.4692.36


Solution

Ensure that:

  • Related