[🐛 Bug]: IWebElement.Displayed throws 'HTMLFormElement' is undefined error in Selenium 4.25
What happened?
After upgrading from Selenium 4.23 to 4.25, the IWebElement.Displayed property is throwing a JavaScriptException with the message "'HTMLFormElement' is undefined" when used on certain elements. This behavior was not observed in the previous version. The element in question is not located within a
@mannaci, thank you for creating this issue. We will troubleshoot it as soon as we can.
Info for maintainers
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template label.
If the issue is a question, add the I-question label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-* label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer label.
Thank you!
hi, is there an update?
Unfortunately, as of June 2022 Selenium no longer supports Internet Explorer.
Since IE is deprecated, you may encounter issues with compatibility specially in newer framework like .NET8
Can we have a deprecation warning for this then?
IE is deprecated but I see the code example is using IE mode in Edge. Is the issue related to that?
Hi diemol, yes of course I'm using edge in iemode. unfortunately I still have interactions with systems that don't work otherwise. The same code with new version (also 4.24) don’t work with error in preview post.
The same code with new version (also 4.24) don’t work with error in preview post.
What does this mean? When did it stop working? Was it a specific MS Edge version or an specific Selenium version?
We wrote a program with version 4.23 and it works perfectly. If I try to upgrade to version 4.24 or 4.25, the 'displayed' property launches the exception "Error from JavaScript: 'HTMLFormElement' is undefined"
Driver version IEDriverServer.exe 4.14.0.0 (32-bit) Microsoft Edge WebDriver 129.0.2792.59 The edge version is the same of the driver
Is it due to https://github.com/SeleniumHQ/selenium/pull/14389 ? I see a new reference to "HTMLFormElement" in atoms/domcore.js
Is it due to #14389 ? I see a new reference to "HTMLFormElement" in atoms/domcore.js
It’s possible, I’m not sure why only IE Mode would be having difficulties though
Hello,
I found an explanation about the problem I've had about "'HTMLFormElement' is undefined"
The website I'm testing is forced in "IE5 compatibility mode". In that mode, HTMLFormElement does not exist
That said, I think there are 2 solutions
- consider that no one should ever test so old applications, so Selenium should not care about this error
- consider it's a regression and test if HtmlFormElement exist before using it
This issue is stale because it has been open 280 days with no activity. Remove stale label or comment or this will be closed in 14 days.
Is this fixable? I still need to test on legacy systems.
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 14 days.