Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using visible text for text #56

Open
beatngu13 opened this issue Apr 8, 2020 · 0 comments
Open

Consider using visible text for text #56

beatngu13 opened this issue Apr 8, 2020 · 0 comments

Comments

@beatngu13
Copy link
Contributor

Text (key text) is currently extracted via nodeValue (see getText), i.e., the node's actual text value. The problem is that the text might be displayed differently, for example, if a certain text-transform is applied. So when a node's text is "foo", this could be displayed as "Foo", "FOO", …

The WebDriver link text locator retrieves the rendered text via the Get Element Text command:

Let rendered text be the result of performing implementation-specific steps whose result is exactly the same as the result of a Call(bot.dom.getVisibleText, null, element).

We might want to consider to do this is as well, but:

  1. Is dom.js available in the browser? If yes, in any browser? If no, do we have to bundle the script since we don't want to reimplement the functionality?
  2. What do we do with redundant information such as text-transform, which is then reflected in the rendered text?
  3. How can this be properly tested?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant