webdriverio: isDisplayed() returning False with Chrome Driver 75.0.3770.8

Using “webdriverio”: “^5.10.4”, we have seen a change in behavior with isDisplayed() after upgrading to the latest version of Chrome Driver.

isDisplayed() using Chrome Driver 74.0.3729.6 will Return True.

Chrome Driver to version 75.0.3770.8, isDisplayed() will then return false.

Code to reproduce the problem. I put a long pause to ensure the element is shown before performing the isDisplayed() check.

describe(‘Debug isDisplayed’, function () { it(‘Debug isDisplayed’, function () { browser.url(https://dev.nebula.care/practice/); browser.pause(5000); const element = $(neb-practice-app).shadow$(‘neb-login-page’).shadow$(#username); console.log(element); console.log(isDisplayed Debugging: ${element.isDisplayed()}); });

Console Log Results when running this code using. Result of isDisplayed() is false with version 75, and true with Chrome Driver 74. [0-0] Element { sessionId: ‘c8997e4e69fde46edc9a910ca0d110e0’, elementId: ‘11f9d7e4-0789-4e75-adb6-a1110d48bb53’, ‘element-6066-11e4-a52e-4f735466cecf’: ‘11f9d7e4-0789-4e75-adb6-a1110d48bb53’, selector: [Function],

[0-0] isDisplayed Debugging: false

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (10 by maintainers)

Most upvoted comments

I see the same issue in ChromeDriver v98 and Mocha 7.14.12. this is always returning true and printing console message even if the element is not present. if(await this.nochangeserror.isDisplayed()){ console.log(‘No change Error displayed’) }

Thank you! That solved the problem. Any thoughts as to why w3c: true would cause this to break?