Permalink
Browse files

updated to webdriver 3 and added a 'legacy' FF test to support old ve…

…rsions of Firefox with version 3
  • Loading branch information...
1 parent dd6c061 commit 35b981342e6f2228fbce59b6ce17eb5a03aaef50 eviltester committed Oct 19, 2016
Showing with 11 additions and 8 deletions.
  1. +3 −6 pom.xml
  2. +8 −2 src/test/java/com/eviltester/webdriver/MyFirstLegacyFFTest.java
View
@@ -40,13 +40,10 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
- <version>2.53.1</version>
+ <!-- <version>2.53.1</version> -->
<!-- 19/October.2016
- version 3.0.1 will work,
- have just left as v 2.53.1 for the moment,
- you can upgrade by deleting the above line and
- removing the html comment tags from the line below -->
- <!-- <version>3.0.1</version> -->
+ have upgraded to 3.0.1 for MyFirstTest -->
+ <version>3.0.1</version>
</dependency>
@@ -20,11 +20,17 @@ public void startWebDriver(){
capabilities.setCapability("marionette", false);
/* If Firefox < v48 is not your default browser then you need to tell WebDriver where it is,
- so uncomment the line below and amend the path to the location of your firefox.exe
+ so uncomment the setCapability line below and amend the firefox_binary_path to the location of your firefox.exe
the example code uses FirefoxPortable from
https://sourceforge.net/projects/portableapps/files/Mozilla%20Firefox%2C%20Portable%20Ed./
*/
- //capabilities.setCapability("firefox_binary", new File(System.getProperty("user.dir"),"/tools/FirefoxPortable/FirefoxPortable.exe").getAbsolutePath());
+
+ // relative location to the project i.e. /tools/FirefoxPortable where /tools is at the same level as /src
+ //String firefox_binary_path = new File(System.getProperty("user.dir"),"/tools/FirefoxPortable/FirefoxPortable.exe").getAbsolutePath();
+ // hard coded location on C drive
+ String firefox_binary_path = "C:\\webdrivers\\FirefoxPortable\\FirefoxPortable.exe";
+
+ //capabilities.setCapability("firefox_binary", firefox_binary_path);
WebDriver driver = new FirefoxDriver(capabilities);

1 comment on commit 35b9813

@pabloca88

This file doesnt include the test...I ran it with mvn and couldnt execute the test..

Please sign in to comment.