Since the release of Google Chrome 77, I updated our CI process so headless automated testing is done with:
- selenium-java 3.141.59 (maven)
- ChromeDriver 77.0.3865.40 (https://chromedriver.storage.googleapis.com/77.0.3865.40/chromedriver_linux64.zip)
- Google Chrome 77.0.3865.90 (77.0.3865.90-1, retrieved via http://dl.google.com/linux/chrome/deb/ stable main)
A simple code who worked perfectly doesn't work anymore, because element.getAttribute('id') returns null instead of the string value of id attribute of the HTML element (which has been found using By.id() !)
I tried such config on Windows and Linux (docker) and the result is the same: getAttribute('id') returns null instead of the HTML element id
Simplified code to reproduce the problem:
String myId = "myInputTypeDateId" ;
WebElement element = (new WebDriverWait(driver, timeout)).until(ExpectedConditions.presenceOfElementLocated(By.id(id)));
String eltId = element.getAttribute("id");
// With chrome 76 & chromedriver 76: returns "myInputTypeDateId"
// With chrome 77 & chromedriver 77: returns null
Additional info:
- the element related to the problem is an
<input type = "date">
- I am using Aura components framework (Salesforce lightning)
Did someone detected a similar issue with Chrome/Chromedriver 77 ?
Any advice about some workaround ?