What happened?
For any HTML element that uses a text-transform of capitalize thegetText atom fails to return the correct text if underscores are used. Instead of Test_text it returns Test_Text.
How can we reproduce the issue?
You can take the following example:
<div style="text-transform: capitalize;">test_text
Here the atom returns Test_Text instead of Test_text.
Applying the following change makes it work:
- var re = goog.userAgent.IE ? /(^|\s|\b)(\S)/g : /(^|[^\d\p{L}\p{S}])([\p{Ll}|\p{S}])/gu;
+ var re = goog.userAgent.IE ? /(^|\s|\b)(\S)/g : /(^|\s|\b)(\S)/gu;
That means that the change from PR #8736 triggered this regression.
@k7z45 could you please take a look?
Relevant log output
Here an excerpt from the log when using this atom in Firefox:
1712307672711 Marionette DEBUG 3 -> [0,6,"WebDriver:GetElementText",{"id":"875c627d-1025-48e7-98be-a0cae9a65b2f"}]
1712307672717 Marionette DEBUG 3 <- [1,6,null,{"value":"Test_Text"}]
Operating System
All
Selenium version
All
What are the browser(s) and version(s) where you see this issue?
All
What are the browser driver(s) and version(s) where you see this issue?
All
Are you using Selenium Grid?
No response
What happened?
For any HTML element that uses a text-transform of
capitalizethegetTextatom fails to return the correct text if underscores are used. Instead ofTest_textit returnsTest_Text.How can we reproduce the issue?
You can take the following example:
Here the atom returns
Test_Textinstead ofTest_text.Applying the following change makes it work:
That means that the change from PR #8736 triggered this regression.
@k7z45 could you please take a look?
Relevant log output
Here an excerpt from the log when using this atom in Firefox:
Operating System
All
Selenium version
All
What are the browser(s) and version(s) where you see this issue?
All
What are the browser driver(s) and version(s) where you see this issue?
All
Are you using Selenium Grid?
No response