directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject directory-fortress-commander git commit: FC-179 - Firefox 48 broke Selenium tests
Date Sun, 18 Sep 2016 14:29:26 GMT
Repository: directory-fortress-commander
Updated Branches:
  refs/heads/master 3a8c88ccf -> 71fe14eb3


  FC-179 - Firefox 48 broke Selenium tests


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/commit/71fe14eb
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/tree/71fe14eb
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/diff/71fe14eb

Branch: refs/heads/master
Commit: 71fe14eb3607055996fc3bcde89356ff1a8647e2
Parents: 3a8c88c
Author: Shawn McKinney <smckinney@apache.org>
Authored: Sun Sep 18 09:29:19 2016 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Sun Sep 18 09:29:19 2016 -0500

----------------------------------------------------------------------
 pom.xml                                         | 21 +++---------
 .../integration/FortressWebSeleniumITCase.java  | 35 ++++++++++++++++----
 2 files changed, 32 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/71fe14eb/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 494e618..ab3576f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -212,25 +212,12 @@
     </dependency>
     
     <dependency>
-      <groupId>org.seleniumhq.selenium</groupId>
-      <artifactId>selenium-java</artifactId>
-      <version>2.52.0</version>
-      <scope>test</scope>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.seleniumhq.selenium</groupId>
-      <artifactId>selenium-common</artifactId>
-      <version>2.0b1</version>
-      <scope>test</scope>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.seleniumhq.selenium.client-drivers</groupId>
-      <artifactId>selenium-java-client-driver</artifactId>
-      <version>1.0.2</version>
+      <groupId>io.github.bonigarcia</groupId>
+      <artifactId>webdrivermanager</artifactId>
+      <version>1.4.9</version>
       <scope>test</scope>
     </dependency>
+
   </dependencies>
 
   <build>

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/71fe14eb/src/test/java/org/apache/directory/fortress/web/integration/FortressWebSeleniumITCase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/web/integration/FortressWebSeleniumITCase.java
b/src/test/java/org/apache/directory/fortress/web/integration/FortressWebSeleniumITCase.java
index 2d4637a..c09da56 100644
--- a/src/test/java/org/apache/directory/fortress/web/integration/FortressWebSeleniumITCase.java
+++ b/src/test/java/org/apache/directory/fortress/web/integration/FortressWebSeleniumITCase.java
@@ -24,13 +24,13 @@ import java.io.File;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 
+import io.github.bonigarcia.wdm.MarionetteDriverManager;
 import org.apache.log4j.Logger;
 import org.junit.*;
 import static org.junit.Assert.*;
 
 import org.openqa.selenium.*;
 import org.openqa.selenium.firefox.FirefoxDriver;
-import org.openqa.selenium.firefox.FirefoxProfile;
 import org.openqa.selenium.remote.LocalFileDetector;
 import org.apache.directory.fortress.web.common.GlobalIds;
 
@@ -61,20 +61,41 @@ public class FortressWebSeleniumITCase
     private StringBuffer verificationErrors = new StringBuffer();
     private static final Logger log = Logger.getLogger( FortressWebSeleniumITCase.class.getName()
);
 
+    @BeforeClass
+    public static void setupClass() {
+        MarionetteDriverManager.getInstance().setup();
+        //MarionetteDriverManager.getInstance().setup("0.10.0");
+    }
+
     @Before
-    public void setUp() throws Exception
+    public void setupTest()
     {
-        FirefoxProfile ffProfile = new FirefoxProfile();
-        ffProfile.setPreference( "browser.safebrowsing.malware.enabled", false );
-        driver = new FirefoxDriver( ffProfile );
+        //DesiredCapabilities capabilities = DesiredCapabilities.firefox();
+        //capabilities.setCapability("marionette", true);
+        //driver = new FirefoxDriver(capabilities);
+
+        driver = new FirefoxDriver( );
         driver.manage().window().maximize();
+    }
+
+    @After
+    public void teardown() {
+        if (driver != null) {
+            driver.quit();
+        }
+    }
 
-        // tomcat default:
+    @Before
+    public void setUp() throws Exception
+    {
+        // http default:
         baseUrl = "http://localhost:8080";
         //baseUrl = "http://fortressdemo2.com:8080";
-        // tomcat SSL:
+
+        // https:
         //baseUrl = "https://localhost:8443";
         //baseUrl = "https://fortressdemo2.com:8443";
+
         driver.manage().timeouts().implicitlyWait( 5, TimeUnit.SECONDS );
     }
 


Mime
View raw message