0

enter image description here

I have tried to launch chromedriver using selenium after instantiating driver.

I am using chrome browser version 111.0.5563.41.

ASHUTOS SAHOO
  • 11
  • 1
  • 1

1 Answers1

0

Please try with the solution below.

ChromeOptions opt = new ChromeOptions();
opt.addArguments("--remote-allow-origins=*");
// Launching the browser
driver=new ChromeDriver(opt);

Typically, ChromeOptions used for a headless run. However, the new chrome version 111 is not compatible with the latest Selenium version even for 4.8, so for the time being this is an alternative solution.

Chaoz
  • 2,119
  • 1
  • 20
  • 39
Bhairu
  • 72
  • 4
  • 1
    Hint: we do not COPY answer content here. Instead, we tell people that there is already an existing answer to solves their problem. And note: when you write answers, make sure to get the formatting and indenting right, instead of just copy/pasting some other peoples code. – GhostCat Mar 13 '23 at 10:22
  • @Bhairu, Why we need to instantiate chromeoptions any reason for that. – ASHUTOS SAHOO Mar 13 '23 at 10:45
  • @Ashutosh Chromeoption is typically used for a headless run. Still, here the case is, the new chrome version 111 is not compatible with the latest selenium version even for 4.8, so for the time being this is the alternative soln. – Bhairu Mar 13 '23 at 11:11