Skip to content

Allow clearing multiple inputs - #108

Merged
rbri merged 1 commit into
HtmlUnit:masterfrom
marcospereira:fixes/clear-input-fields
Dec 12, 2019
Merged

rbri merged 1 commit into
HtmlUnit:masterfrom
marcospereira:fixes/clear-input-fields

Conversation

@marcospereira

@marcospereira marcospereira commented Dec 12, 2019 •

Copy link
Copy Markdown
Contributor

Some inputs, such as date, datetime, range, and week were not cleanable since they only accept setting valid values. This makes them either accept valid values or and empty string. Other fields such as email or URL were already accepting empty String when setting the value attribute.

I noticed this while working with Selenium's htmlunit-driver. There is a clear method there which calls setValueAttribute with and empty String:

https://github.com/SeleniumHQ/htmlunit-driver/blob/dcab0f9e0ffc3a15625dfa8866997b42eb6b2e0c/src/main/java/org/openqa/selenium/htmlunit/HtmlUnitWebElement.java#L233

But since a bunch of them don't accept it as a valid value, them it makes impossible to clear the field without resorting to workarounds.

Some inputs, such as date, datetime, range, and week were not
cleanable since they only accept setting valid values. This makes
them either accept valid values or and empty string.
@rbri
rbri merged commit 47c7741 into HtmlUnit:master Dec 12, 2019
@marcospereira
marcospereira deleted the fixes/clear-input-fields branch December 12, 2019 19:23
@marcospereira

Copy link
Copy Markdown
Contributor Author

Thank you, @rbri. Any idea about when this will be part of a release?

@rbri

rbri commented Dec 12, 2019

Copy link
Copy Markdown
Member

Thank

@rbri

rbri commented Dec 12, 2019

Copy link
Copy Markdown
Member

Thank you for the patch.
There are no real plans for a release other than doing it this year.
Do you need one?

@marcospereira

Copy link
Copy Markdown
Contributor Author

Hey @rbri,

As I said in the description, the intent was to fix a problem I found when using Selenium's htmlunit-driver, so I would like to update the dependency and also have a release there. My end goal is to finish scalatest/scalatestplus-selenium#7 and then fix playframework/scalatestplus-play#214 (sorry for all those jumps). Therefore, yes, having a release would help to move the downstream projects forward.

But I'm not in a hurry here and this year sounds good to me. ;-)

Thanks!

@marcospereira

Copy link
Copy Markdown
Contributor Author

Hey @rbri,

Happy New Year! 🎉

Any idea of when a new version will be released?

@cheeseng

Copy link
Copy Markdown

@rbri @marcospereira +1 For the new release to include this fix!

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.

3 participants