After Chrome and driver update to 91th version I found the VBA macro with driver 91.0.4472.19 (win32) become return empty string ("") from input tag 'value' attribute:
Dim ch As SeleniumWrapper.WebDriver
Dim el As WebElement
' some code here ...
ch.findElementById("htmlLoginId").SendKeys login
Set el = ch.findElementById("htmlLoginId")
txt = el.getAttribute("value")
With older driver version 90.0.4430.24 this works fine. Hope it will be fixed in next driver versions.
Is there another way to get value from input[type=text]
tag? I want to avoid situation if this bug will not be fixed in 92th version and 90th driver version become incompatible.
We have been fighting with this issue a couple of days since the new chrome driver came out. A workaround we did was to bypass calls to the webdriver's getAttribute
method if we want to retrieve properties (that are not html attributes) of the element and instead use the following custom script:
browser.executeScript(`return arguments[0].${this.textAttribute}`, el);
The above example is valid for protractor, which is what we are using. If your stack is different, you need to call the appropriate alternative to browser.executeScript
, but the script itself would be quite the same.
We did it!
ARG CHROME_VERSION="90.0.4430.212-1"
RUN wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb \
&& apt install -y /tmp/chrome.deb \
&& rm /tmp/chrome.deb
./webdriver-manager update --versions.chrome 90.0.4430.24
This was a regression in chrome driver 91. A fix has been made. Hopefully an updated v91 chrome driver will be released soon.
https://bugs.chromium.org/p/chromium/issues/detail?id=1205107
In the meantime we are using chrome driver 90.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With