Home > Enterprise >  finding Element causing chrome driver instance to crash
finding Element causing chrome driver instance to crash

Time:11-04

First the Environment:

  • Node JS 16.15.0

  • Web Driver io v7 (wdio)

  • wdio/cucumber framework

  • end to end testing of a website

    -obviously using cucumber and feature files

  • using a test configuration file similar to wdio's

  • using wdio-chromedriver-service v7.2.6 and npm chromedriver package version ^107 to produce a browser to hit

    • my browser : chrome v107.0.5304.62

The Question:

an element cannot be found by webDriver as I expect, but the command causes the instance to crash

I am searching for an element that no longer appears on the page (it is a spinner element that shows the page is loading)

I call

if(await this.spinner.isDisplayed())

and then the test run hangs, the debugger tells me the command

INFO webdriver: COMMAND findElement("css selector", "i.fa-spinner")

is running and then nothing else, finally the renderer times out

WARN chromedriver: [SEVERE]: Timed out receiving message from renderer: 600.000

DEBUG webdriver: request failed due to response error: timeout

and the chrome instance crashes shortly later

I am unsure why this behavior is happening, is something wrong with my wdio configuration? or with my chrome driver?

What I have tried

I understand that browser.setTimeout exists but I am sure it is not set in my config anywhere. I have done a global search (using vscode for all development) for browser.setTimeout (no results). I have manually set browser.setTimeout({ 'implicit': 0 }) (no success). I have also tried directly hitting a chrome driver instance by manually downloading a chrome driver exe that matched my browser version v107.0.5304.62 and removing the 'services: ['chromedriver']' from my test config file

when this happens something very interesting occurs, I can keep running after searching for the element that broke the run before, but we dont get very far and the command still causes issues. Chrome driver is throwing errors like

error: 'no such element', [0-0] message: 'no such element: Unable to locate element: {"method":"css selector","selector":"i.fa-spinner"}\n' [0-0] ' (Session info: chrome=107.0.5304.87)'

The browser closes shortly afterwards without progressing through the rest of the tests.

I find it interesting that the version that chrome driver says it is running is 107.0.5304.87 since the version of chromedriver I downloaded clearly says it is v107.0.5304.62 and my chrome version clearly states it is also v107.0.5304.62 . though theoretically using v107.0.5304.87 shouldnt be an issue according to this since the 107.0.5304 part matches across the board

I could use some assistance.

CodePudding user response:

We had the same issue this days, seems there is a bug introduced in Chrome 106; try to change config or downgrade Chrome on the machine to use Chrome 105 as with this version is working.

CodePudding user response:

Having the same issue only started lately with chrome updated. Do you know if they are working on resolving this bug?

  • Related