I just installed the latest version of Selenium Runner
npm install -g selenium-side-runner
on my Mac High Sierra. I\'m running node v14.1.
The invalid session ID error is a WebDriver error that occurs when the server does not recognize the unique session identifier. This happens if the session has been deleted or if the session ID is invalid.
A WebDriver session can be deleted through either of the following ways:
Explicit session deletion: A WebDriver session is explicitly deleted when explicitly invoking the quit()
method.
Implicit session deletion: A WebDriver session is implicitly deleted when you close the last window or tab invoking close()
.
You can find a detailed discussion in selenium.common.exceptions.WebDriverException: Message: invalid session id using Selenium with ChromeDriver and Chrome through Python
I don't see any such error within your code block. However your main error seems to be...
Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Error:
...which implies that the Async callback
being referred to in the error is getting timedout even with timeout set as 300000
:
jest.setTimeout(300000);
The real issue is with the url of KarmaDecay which contains a hCaptcha to keep off automated bots.
As per your test setup to execute the selenium-side-runner
within the website http://karmadecay.com/ first you have to interact with the captcha to get authenticated and then run your tests.
You can find a couple of relevant discussions on how to interact with recaptcha in:
If the initial tests works fine but for the rest of your tests you get a session ID error most possibly the Selenium WebDriver controled Browsing Context is getting detected and hence blocking the next requests.
There are different reasons for the WebDriver controled Web Browser to get detected and simultaneously get blocked. You can find a couple of detailed discussion in: