Skip to content

Commit

Permalink
use new setValue instead of setValueAttribute for input elements
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Jun 1, 2022
1 parent 7e60f2b commit 01b14da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.seleniumhq.selenium</groupId>
<artifactId>htmlunit-driver</artifactId>
<version>3.61.0</version>
<version>3.62.0-SNAPSHOT</version>

<name>htmlunit-driver</name>
<description>WebDriver compatible driver for HtmlUnit headless browser</description>
Expand All @@ -14,7 +14,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<selenium.version>4.1.3</selenium.version>
<htmlunit.version>2.61.0</htmlunit.version>
<htmlunit.version>2.62.0-SNAPSHOT</htmlunit.version>
<jetty.version>9.4.46.v20220331</jetty.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private void sendKeys(HtmlElement element, InputKeysContainer keysToSend, boolea
// HtmlElement.type doesn't modify the value of a file input element. Special case.
if (element instanceof HtmlFileInput) {
HtmlFileInput fileInput = (HtmlFileInput) element;
fileInput.setValueAttribute(keysSequence);
fileInput.setValue(keysSequence);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public void clear() {
if (htmlInput.isDisabled()) {
throw new InvalidElementStateException("You may only interact with enabled elements");
}
htmlInput.setValueAttribute("");
htmlInput.setValue("");
if (htmlInput instanceof SelectableTextInput) {
((SelectableTextInput) htmlInput).setSelectionEnd(0);
}
Expand Down

0 comments on commit 01b14da

Please sign in to comment.