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

Add a textarea element #212

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

limbov8
Copy link

@limbov8 limbov8 commented Sep 18, 2021

Add new clear options to set a value for textareas. By default, in
the chrome selenium test, when set value of text-related node, it would
only prepend the first line. As the capybara chrome node: it only sends
space and backspace to clear the text. https://bit.ly/3zpJZYJ
However, this will ONLY clear the first line of the text area.

In this commit, we added a Textarea element to override the set method
to clear all text in the text area.

This is following the set definition in the Capybara: it says we could
use [[:command, 'a'], :backspace] to clear all text.
Github capybara/selenium/node.rb#L55: https://bit.ly/3CtlTP3

It works both for firefox and chrome

Add new clear options to set a value for textareas. By default, in
chrome selenium test, when `set` value of text-related node, it would
only prepend the first line. As the capybara chrome node: it only send
a space and a backspace to clear the text. https://bit.ly/3zpJZYJ
However, this will **ONLY** clear the first line of the textarea.

In this commit, we added a Textarea element to override the `set` method
to clear all text in the textarea.

This is following the set definition in the Capybara: it says we could
use `[[:command, 'a'], :backspace]` to clear all text.
Github capybara/selenium/node.rb#L55: https://bit.ly/3CtlTP3

It works both for firefox and chrome
@limbov8 limbov8 force-pushed the liboAddSupportForChromeWebdriver branch 2 times, most recently from f5f3a0b to b4190e0 Compare October 1, 2021 20:09
@limbov8
Copy link
Author

limbov8 commented Jun 7, 2022

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.

1 participant