protractor: Chrome 91 will break more Protractor tests
Bug report
- Node Version:
14.17.0
- Protractor Version:
7.0.0
- Browser(s):
Chrome v91
- Operating System and Version
Windows 10
The issue started to reproduce with the release of chromedriver v91. https://bugs.chromium.org/p/chromium/issues/detail?id=1205107&start=300
Method getAttribute will always return null within usage of older JWP (w3c: false). From another side, with the w3c: true on legacy Selenium 3 - browser actions are not working due to incompatibility.
So the recommendation is to upgrade with selenium-webdriver 4.0 where full support of w3c implemented.
I have added a PR where made upgrades with the latest selenium 4.0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 36
- Comments: 17 (3 by maintainers)
Commits related to this issue
- feat(protractor): support for Chrome 91 ChromeDriver 91 introduced a breaking change that makes GetElementAttribute command return `null` instead of the actual attribute value. This change works aro... — committed to serenity-js/serenity-js by jan-molak 3 years ago
- Temporarly archive few tests in relation to protractor failures https://github.com/angular/protractor/issues/5519 — committed to globaleaks/GlobaLeaks by evilaliv3 3 years ago
- Temporarly archive few tests in relation to protractor failures https://github.com/angular/protractor/issues/5519 — committed to globaleaks/GlobaLeaks by evilaliv3 3 years ago
- Temporarly archive few tests in relation to protractor failures https://github.com/angular/protractor/issues/5519 — committed to globaleaks/GlobaLeaks by evilaliv3 3 years ago
- Temporarly archive few tests in relation to protractor failures https://github.com/angular/protractor/issues/5519 — committed to globaleaks/GlobaLeaks by evilaliv3 3 years ago
- Temporarly archive few tests in relation to protractor failures https://github.com/angular/protractor/issues/5519 — committed to globaleaks/GlobaLeaks by evilaliv3 3 years ago
- Temporarly archive few tests in relation to protractor failures https://github.com/angular/protractor/issues/5519 — committed to globaleaks/GlobaLeaks by evilaliv3 3 years ago
I can also confirm. I know this is just saying +1, but if we could get the attention of some of the Angular team, it’d be great. Our whole CI/CD pipline is in shatters because of this.
The last chromedriver that worked with
getAttribute("value")
was version 90.0.4430.24.Until chromedriver gets patched (which seems like it will be according to this thread posted by @StanislavKharchenko) we use this fix in our ci pipeline to use that version run our angular protractor tests.
This is what out pipline looked like before:
This is what it looks like after:
Good luck!
I also confirm that element.getAttribute(‘value’) where element is input or textarea always returns null when used with chromedriver=91.0.4472.19 (chrome=91.0.4472.77). Also element.clear() doesn’t work anymore.
Workarounds:
I confirm that
element.getAttribute('value')
where element is an<input>
always returns null when used with chromedriver=91.0.4472.19 (chrome=91.0.4472.77).Perhaps,
element.getAttribute('id')
orelement.getAttribute('class')
are working fine.It’s possible to use this hack to get the value of the
<input>
while waiting for the fix:browser.executeScript(``return document.getElementById("${id}").value``)
@evilaliv3 Thanks for posting that! Looks like the firefox was the next. However, I see that chromium fixed this. I’m not checked yet, since in our team we migrated to my fork Protractor v6 with selenium 4.0 and all is fine.
@angular team, @kyliau, @Splaktar Could you please give to community some info about upgrades to selenium 4.0? I’ve added a PR, but any activities are stalled again 😦
@navix There was a decision to continue Protractor as v6 without control flow. That’s why this issue was registered and PR added. For now the master branch reflects v6. The next step should merge PR and release.
This seems to be related to https://github.com/angular/protractor/issues/5522
I was actually verifying the error with getAttribute(‘value’) on firefox but from this ticket i understand the error is more broad.
what do you think?
Using class but still unable to get the value. Tried with id also but not working.