Quantcast

[HtmlUnit] SVN: [13841] branches/huThread/htmlunit/src/test/java/com/gargoylesoftware /htmlunit/javascript/host/html/HTMLElementTest.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[HtmlUnit] SVN: [13841] branches/huThread/htmlunit/src/test/java/com/gargoylesoftware /htmlunit/javascript/host/html/HTMLElementTest.java

asashour-2
Revision: 13841
          http://sourceforge.net/p/htmlunit/code/13841
Author:   asashour
Date:     2017-03-20 10:43:40 +0000 (Mon, 20 Mar 2017)
Log Message:
-----------
test passes

Modified Paths:
--------------
    branches/huThread/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java

Modified: branches/huThread/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java
===================================================================
--- branches/huThread/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java 2017-03-20 10:39:09 UTC (rev 13840)
+++ branches/huThread/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java 2017-03-20 10:43:40 UTC (rev 13841)
@@ -50,6 +50,11 @@
 @RunWith(BrowserRunner.class)
 public class HTMLElementTest extends WebDriverTestCase {
 
+    @Override
+    protected boolean supportsWebDriver() {
+        return true;
+    }
+
     /**
      * @throws Exception if the test fails
      */
@@ -381,12 +386,17 @@
             + "  </form>\n"
             + "</body></html>";
 
+        final String[] expectedAlerts = getExpectedAlerts();
+
         final WebDriver webDriver = loadPage2(html);
 
         webDriver.findElement(By.id("login")).click();
+
+        verifyAlerts(webDriver, expectedAlerts[0], expectedAlerts[1]);
+
         webDriver.findElement(By.id("password")).click();
 
-        verifyAlerts(webDriver, getExpectedAlerts());
+        verifyAlerts(webDriver, expectedAlerts[2], expectedAlerts[3]);
     }
 
     /**
@@ -421,9 +431,9 @@
 
         final WebDriver webDriver = loadPage2(html);
 
+        verifyAlerts(webDriver, getExpectedAlerts());
+
         webDriver.findElement(By.id("login")).click();
-
-        verifyAlerts(webDriver, getExpectedAlerts());
     }
 
     /**
@@ -456,9 +466,9 @@
 
         final WebDriver webDriver = loadPage2(html);
 
+        verifyAlerts(webDriver, getExpectedAlerts());
+
         webDriver.findElement(By.id("login")).click();
-
-        verifyAlerts(webDriver, getExpectedAlerts());
     }
 
     /**
@@ -491,9 +501,9 @@
 
         final WebDriver webDriver = loadPage2(html);
 
+        verifyAlerts(webDriver, getExpectedAlerts());
+
         webDriver.findElement(By.id("login")).click();
-
-        verifyAlerts(webDriver, getExpectedAlerts());
     }
 
     /**
@@ -519,12 +529,15 @@
             + "  </form>\n"
             + "</body></html>";
 
+        final String[] expectedAlerts = getExpectedAlerts();
+
         final WebDriver webDriver = loadPage2(html);
 
         webDriver.findElement(By.id("login")).click();
+        verifyAlerts(webDriver, expectedAlerts[0], expectedAlerts[1]);
+
         webDriver.findElement(By.id("password")).click();
-
-        verifyAlerts(webDriver, getExpectedAlerts());
+        verifyAlerts(webDriver, expectedAlerts[2]);
     }
 
     /**
@@ -553,9 +566,12 @@
 
         final WebDriver webDriver = loadPage2(html);
 
+        final String[] expectedAlerts = getExpectedAlerts();
+        verifyAlerts(webDriver, expectedAlerts[0], expectedAlerts[1]);
+
         webDriver.findElement(By.id("login")).click();
 
-        verifyAlerts(webDriver, getExpectedAlerts());
+        verifyAlerts(webDriver, expectedAlerts[2]);
     }
 
     /**


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Loading...