Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,4 @@ buildNumber.properties

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
/.idea/libraries/
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.0.1</version>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.10</version>
<version>6.11</version>
</dependency>
</dependencies>

Expand All @@ -28,7 +28,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<version>2.20</version>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
Expand All @@ -41,7 +41,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.7.201606060606</version>
<version>0.7.9</version>
<executions>
<execution>
<goals>
Expand Down
18 changes: 9 additions & 9 deletions src/test/java/localbrowsers/Firefox.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@ public class Firefox {
public void firefoxSetup() {
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
System.out.println(System.getProperty("os.name"));
if(!System.getProperty("os.name").toLowerCase().contains("windows")){
FirefoxBinary ff = new FirefoxBinary(new File("/Applications/Firefox.app/Contents/MacOS/firefox-bin"));
FirefoxProfile ffp = new FirefoxProfile();

driver = new FirefoxDriver(ff, ffp, capabilities);}
else{
// mac requires the binary location to be set for firefox, not sure why at time of update
if (System.getProperty("os.name").toLowerCase().contains("mac")) {
FirefoxBinary ff = new FirefoxBinary(new File("/Applications/Firefox.app/Contents/MacOS/firefox-bin"));
FirefoxProfile ffp = new FirefoxProfile();
driver = new FirefoxDriver(ff, ffp, capabilities);
} else {
driver = new FirefoxDriver();
}
}

@Test
public void test(){
public void test() {
driver.get("http://lazycoder.io/about.html");
Assert.assertEquals(driver.getTitle(), "Lazy Coder Origins");
}

@AfterTest
public void testTeardown(){
public void testTeardown() {
driver.quit();
}
}
11 changes: 7 additions & 4 deletions windows_install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ title Setting up your machine for Selenium Testing!

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

choco install firefox
choco install googlechrome
choco install phantomjs
choco install selenium-all-drivers
choco install firefox -y
choco install googlechrome -y
choco install phantomjs -y
choco install selenium-all-drivers -y
choco install jdk8 -y
choco install maven -y
SETX PATH "%PATH%;C:\tools\selenium"