You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am upgrading Selenium test code in .NET 8 from Selenium.Support version 4.25.0 to 4.27.0
Because IWebElement.GetAttribute() method is now marked as deprecated, I replaced it with GetDomProperty().
For example: webDriver.FindElement(By....whatever).GetDomProperty("style")
should return a string like background: rgb(65, 131, 215); height: 8.125%;
but returns this string: System.Collections.Generic.Dictionary2[System.String,System.Object]`
Looks like a bug - that string is the string representation of calling .ToString() on a Dictionary instance.
Or is it supposed to work like this?
When I use GetDomAttribute() instead of GetDomProperty(), the correct string is returned: background: rgb(65, 131, 215); height: 8.125%;
How can we reproduce the issue?
See above in"What happened"
Relevant log output
Not sure - using Selenium in Visual Studio unit test framework. Not seeing any useful stuff in debug output.
Operating System
Windows 11
Selenium version
.NET 4.27.0
What are the browser(s) and version(s) where you see this issue?
Firefox 132.0.2
What are the browser driver(s) and version(s) where you see this issue?
GeckoDriver 0.35.0
Are you using Selenium Grid?
no
The text was updated successfully, but these errors were encountered:
@Mek7, 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.
Yes, GetDomAttribute() works OK but GetDomProperty() returns the ToString() result of a dictionary.
Both methods return string. When I migrated the old code, when one did not work, I used the other :)
What happened?
I am upgrading Selenium test code in .NET 8 from Selenium.Support version 4.25.0 to 4.27.0
Because IWebElement.GetAttribute() method is now marked as deprecated, I replaced it with GetDomProperty().
For example:
webDriver.FindElement(By....whatever).GetDomProperty("style")
should return a string like
background: rgb(65, 131, 215); height: 8.125%;
but returns this string:
System.Collections.Generic.Dictionary
2[System.String,System.Object]`Looks like a bug - that string is the string representation of calling .ToString() on a Dictionary instance.
Or is it supposed to work like this?
When I use GetDomAttribute() instead of GetDomProperty(), the correct string is returned:
background: rgb(65, 131, 215); height: 8.125%;
How can we reproduce the issue?
Relevant log output
Operating System
Windows 11
Selenium version
.NET 4.27.0
What are the browser(s) and version(s) where you see this issue?
Firefox 132.0.2
What are the browser driver(s) and version(s) where you see this issue?
GeckoDriver 0.35.0
Are you using Selenium Grid?
no
The text was updated successfully, but these errors were encountered: