0

I'm tring to use Selenium for PHPUnit. But for first attempt, something went wrong.

I have error "invalid session id" in PHPUnit, but Selenium logs says, that everything is fine. Full text of error:

{stacktrace=#0 0x55c2598402d3 <unknown>, error=invalid session id, message=invalid session id}

What I did.

  1. Has installed php 7.3:

    apt install php7.3
    
  2. Installed Java:

    apt install default-jdk 
    
  3. Downloaded Chrome Driver ChromeDriver 81.0.4044.138

  4. Downloaded Selenium server stanalone

Now I understood, that I dowloaded wrong version of Selenium Server.

  • Wrong: selenium-server-standalone-3.1.0.jar
  • Right: selenium-server-standalone-3.141.59.jar and higher.
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352

1 Answers1

0

You may be still facing the same invalid session id error as:

  • You still seem to be using ChromeDriver 81.0.4044.138
  • Presumably you are using the latest chrome=104.0

So there is a clear mismatch between chrome=104.0 and the chromedriver=81.0.4044.138


Solution

Ensure that:

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352