diff --git a/src/test/java/org/htmlunit/html/HtmlResetInput2Test.java b/src/test/java/org/htmlunit/html/HtmlResetInput2Test.java
index 6702734e53..f6c9159d69 100644
--- a/src/test/java/org/htmlunit/html/HtmlResetInput2Test.java
+++ b/src/test/java/org/htmlunit/html/HtmlResetInput2Test.java
@@ -258,13 +258,19 @@ public void reset() throws Exception {
final WebDriver webDriver = loadPage2(html);
final WebElement textfield = webDriver.findElement(By.id("textfield"));
- assertEquals(getExpectedAlerts()[0], textfield.getAttribute("value"));
+
+ assertEquals(getExpectedAlerts()[0], textfield.getDomAttribute("value"));
+ assertEquals(getExpectedAlerts()[0], textfield.getDomProperty("value"));
+
textfield.sendKeys("newValue");
- assertEquals(getExpectedAlerts()[1], textfield.getAttribute("value"));
+ assertEquals(getExpectedAlerts()[0], textfield.getDomAttribute("value"));
+ assertEquals(getExpectedAlerts()[1], textfield.getDomProperty("value"));
final WebElement reset = webDriver.findElement(By.name("resetBtn"));
reset.click();
- assertEquals(getExpectedAlerts()[2], textfield.getAttribute("value"));
+
+ assertEquals(getExpectedAlerts()[0], textfield.getDomAttribute("value"));
+ assertEquals(getExpectedAlerts()[2], textfield.getDomProperty("value"));
}
/**
@@ -291,13 +297,17 @@ public void onclickDisables() throws Exception {
final WebDriver webDriver = loadPage2(html);
final WebElement textfield = webDriver.findElement(By.id("textfield"));
- assertEquals(getExpectedAlerts()[0], textfield.getAttribute("value"));
+ assertEquals(getExpectedAlerts()[0], textfield.getDomAttribute("value"));
+ assertEquals(getExpectedAlerts()[0], textfield.getDomProperty("value"));
+
textfield.sendKeys("newValue");
- assertEquals(getExpectedAlerts()[1], textfield.getAttribute("value"));
+ assertEquals(getExpectedAlerts()[0], textfield.getDomAttribute("value"));
+ assertEquals(getExpectedAlerts()[1], textfield.getDomProperty("value"));
final WebElement reset = webDriver.findElement(By.name("resetBtn"));
reset.click();
- assertEquals(getExpectedAlerts()[2], textfield.getAttribute("value"));
+ assertEquals(getExpectedAlerts()[0], textfield.getDomAttribute("value"));
+ assertEquals(getExpectedAlerts()[2], textfield.getDomProperty("value"));
}
/**
diff --git a/src/test/java/org/htmlunit/javascript/host/dom/DocumentTest.java b/src/test/java/org/htmlunit/javascript/host/dom/DocumentTest.java
index 10d813dec1..e78961e937 100644
--- a/src/test/java/org/htmlunit/javascript/host/dom/DocumentTest.java
+++ b/src/test/java/org/htmlunit/javascript/host/dom/DocumentTest.java
@@ -2581,25 +2581,24 @@ public void createStyleSheet() throws Exception {
* @throws Exception if the test fails
*/
@Test
- @Alerts("#document-fragment_null_11_null_0_")
+ @Alerts({"#document-fragment", "null", "11", "null", "0"})
public void createDocumentFragment() throws Exception {
- final String html = "
foo\n"
- + "\n"
+ + LOG_TEXTAREA
+ "";
- final WebDriver driver = loadPage2(html);
- final String expected = getExpectedAlerts()[0];
- assertEquals(expected, driver.findElement(By.id("myTextarea")).getAttribute("value"));
+ loadPageVerifyTextArea2(html);
}
/**
diff --git a/src/test/java/org/htmlunit/javascript/host/dom/EventNodeTest.java b/src/test/java/org/htmlunit/javascript/host/dom/EventNodeTest.java
index e1efa8e45f..694de9fa76 100644
--- a/src/test/java/org/htmlunit/javascript/host/dom/EventNodeTest.java
+++ b/src/test/java/org/htmlunit/javascript/host/dom/EventNodeTest.java
@@ -87,17 +87,15 @@ public void fireEvent_initFromTemplate() throws Exception {
* @throws Exception if the test fails
*/
@Test
- @Alerts("mousedown span,mouseup span,click span,mousedown text,focus text,mouseup text,"
- + "click text,mousedown image,focus image,mouseup image,click image,mousedown textarea,focus textarea,"
- + "mouseup textarea,click textarea,")
+ @Alerts({"mousedown span", "mouseup span", "click span",
+ "mousedown text", "focus text", "mouseup text", "click text",
+ "mousedown image", "focus image", "mouseup image", "click image",
+ "mousedown textarea", "focus textarea", "mouseup textarea", "click textarea"})
public void clickEvents() throws Exception {
final String html = "\n"
+ "\n"
+ " \n"
+ "\n"
+ " \n"
+ " \n"
- + " \n"
+ + LOG_TEXTAREA
+ "";
final WebDriver driver = loadPage2(html);
@@ -120,23 +118,20 @@ public void clickEvents() throws Exception {
driver.findElement(By.id("testInput")).click();
driver.findElement(By.id("testImage")).click();
driver.findElement(By.id("testTextarea")).click();
- final String expected = getExpectedAlerts()[0];
- assertEquals(expected, driver.findElement(By.id("myTextarea")).getAttribute("value"));
+
+ verifyTextArea2(driver, getExpectedAlerts());
}
/**
* @throws Exception if the test fails
*/
@Test
- @Alerts("mousedown label,mouseup label,click label,focus text,click text,")
+ @Alerts({"mousedown label", "mouseup label", "click label", "focus text", "click text"})
public void clickEventsLabel() throws Exception {
final String html = "\n"
+ "\n"
+ " \n"
+ "\n"
+ "