diff --git a/src/test/java/org/htmlunit/html/HtmlTextInputTest.java b/src/test/java/org/htmlunit/html/HtmlTextInputTest.java
index 90f2b7b35bf..f820f6c0700 100644
--- a/src/test/java/org/htmlunit/html/HtmlTextInputTest.java
+++ b/src/test/java/org/htmlunit/html/HtmlTextInputTest.java
@@ -27,7 +27,6 @@
import org.junit.runner.RunWith;
import org.openqa.selenium.By;
import org.openqa.selenium.InvalidElementStateException;
-import org.openqa.selenium.JavascriptException;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
@@ -676,7 +675,7 @@ public void sendKeysEnterWithoutForm() throws Exception {
/**
* @throws Exception if the test fails
*/
- @Test(expected = JavascriptException.class)
+ @Test(expected = UnsupportedOperationException.class)
public void submitWithoutForm() throws Exception {
final String html =
"\n"