Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasperson committed Oct 26, 2019
1 parent c799538 commit 8457a7a
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/test/java/au/com/agic/apptesting/LiveTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,24 @@ private File[] getHarFiles() {
});
}

/**
* Not all environments support all browsers, so we can define the browsers that are tested
* via a system property. We also track any supplied values for external driver executable locations.
*/
@Before
public void getBrowserList() {
@BeforeClass
public void saveProperties() {
Arrays.asList(Constants.USE_SUPPLIED_WEBDRIVERS,
Constants.CHROME_WEB_DRIVER_LOCATION_SYSTEM_PROPERTY,
Constants.OPERA_WEB_DRIVER_LOCATION_SYSTEM_PROPERTY,
Constants.FIREFOX_WEB_DRIVER_LOCATION_SYSTEM_PROPERTY,
Constants.EDGE_WEB_DRIVER_LOCATION_SYSTEM_PROPERTY,
Constants.PHANTOM_JS_BINARY_PATH_SYSTEM_PROPERTY)
.forEach(s -> driverSettings.put(s, StringUtils.defaultIfBlank(System.getProperty(s), "")));
}

/**
* Not all environments support all browsers, so we can define the browsers that are tested
* via a system property. We also track any supplied values for external driver executable locations.
*/
@Before
public void getBrowserList() {


final String browsersSysProp = SYSTEM_PROPERTY_UTILS.getPropertyEmptyAsNull(TEST_BROWSERS_SYSTEM_PROPERTY);
if (StringUtils.isBlank(browsersSysProp)) {
Expand Down

0 comments on commit 8457a7a

Please sign in to comment.