webdriverio/webdriverio
GitHub で見る[🐛 Bug]: getText() is extracting the text as in DOM not how the text appears in the webpage
Open
#14,371 opened on 2025年4月4日
Bug 🐛help wanted
説明
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
9.X.X
Node.js Version
20
Mode
Standalone Mode
Which capabilities are you using?
What happened?
In one of my scenario, the button text in DOM is 'You have been selected' and it shows as it is in webpage too, but my getText() returns 'you have been selected'. It seems getText() is always extracting the text of the element from DOM and in lower case, irrespective of its appearance in the DOM and in Web page
What is your expected behavior?
Can we please get a consistent solution to extract the text as it appears in the webpage irrespective of what is in DOM
How to reproduce the bug.
try in any webpage where element text has a css text-transformation
Relevant log output
NIL
Code of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues