lefthandedgoat / canopy

f# web automation and testing library, built on top of Selenium (friendly to c# also)
http://lefthandedgoat.github.io/canopy/
MIT License
506 stars 115 forks source link

Canopy tests started failing with elementNotfound exception #493

Open ghost opened 4 years ago

ghost commented 4 years ago

Describe the bug The canopy tests started failing with below exception "canopy.types+CanopyElementNotFoundException: can't find element ........" after chrome version upgraded to beta - 81.0.4044.20. It was working before with the stable version of chrome 80.0.3987.106. Chromedriver version : 81.0.4044.69 Canopy version: 2.1

Is there any dependency b/w canopy and browser versions?

lefthandedgoat commented 4 years ago

It loks like your chrome driver version is ahead of your chrome version (ending in 69 vs ending in 20)

It looks like there is a .20 for chrome driver:

https://chromedriver.chromium.org/downloads

Try that and it will probably fix it. Or you can try updating your chrome again and see if it will update to .69

ghost commented 4 years ago

Just now, I have downloaded the latest version of chrome beta and chromedriver.

If you are using Chrome version 81, please download ChromeDriver 81.0.4044.69

Chrome: Version 81.0.4044.83 ChromeDriver: 81.0.4044.69

It failed:

  1. Couldn't find any elements with selector ...
  2. Exception details: canopy.types+CanopyElementNotFoundException: can't find element .... etc.
lefthandedgoat commented 4 years ago

I will have to reproduce tonight sometime.
can you try to run a really simple test like this?

"Apostrophes don't break anything" &&& fun _ ->
    url "http://lefthandedgoat.github.io/canopy/testpages/"
    count "I've got an apostrophe" 1
ghost commented 4 years ago

So I have included this simple test in our POC. This test passed, but actually we set certain things before test execution, where in it calls some div elements. and it fails there. so do these elements depends on the browser also?

lefthandedgoat commented 4 years ago

I think what is happening is that your selector may not be correct.

If you take the selector your are trying to use, open chrome dev tools in your normal browser (press f12), then in the console tab type $('your selector here'), if it does not return anything, then you have an issue. This example should return one so you can see what the results would look like. $('body')

ghost commented 4 years ago

Ok I will try that. But again why the same selector(the div) is working in other browser version, ? It was working before. When it is modified to use latest chrome beta version, then it started failing.

lefthandedgoat commented 4 years ago

I honestly dont know. Probably best to not use beta version of a browser.