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

chore: Be smarter about setting the text #329

Merged
merged 1 commit into from
Jan 30, 2020

Conversation

mykola-mokhnach
Copy link
Contributor

Related to appium/appium#13886

Copy link
Contributor

@imurchie imurchie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does !element.setText(text) replace the text? It's unclear why all this is necessary.

@mykola-mokhnach
Copy link
Contributor Author

yes, setText does replace the current text. This just optmizes the logic if we know the content should be replaced, so we don't perform unnecessary calls to accessibility methods.

Copy link

@bogdancucosel bogdancucosel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is way better than before.
When replacing, the element does not get cleared, and this allows for locators that have a condition on the text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants