查找导致chrome驱动程序示例崩溃的元素

2izufjch  于 2022-12-06  发布在  Go
关注(0)|答案(1)|浏览(134)

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.

o8x7eapl

o8x7eapl1#

这几天我们遇到了同样的问题,似乎Chrome 106中引入了一个bug;尝试更改配置或降级机器上的Chrome以使用Chrome 105,因为此版本正在工作。

相关问题