Skip to content

Commit

Permalink
Merge branches 'master' and 'nam-integrating' of https://github.com/C…
Browse files Browse the repository at this point in the history
  • Loading branch information
namvuCosmo committed Jun 11, 2019
2 parents 5363e1e + 202ea61 commit 9fe6da7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/main/java/io/cosmosoftware/kite/report/ParamList.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public JsonArray toJson() {
for (String key : this.keySet()) {
builder.add(Json.createObjectBuilder()
.add("name", key)
.add("value", this.get(key)).build());
.add("value", this.get(key) != null ? this.get(key) : "NC").build());
}
return builder.build();
}
Expand Down
27 changes: 16 additions & 11 deletions src/main/java/io/cosmosoftware/kite/util/WebDriverUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,24 @@ public static void clickElement(WebDriver webDriver, WebElement element, boolean
* @param webDriverList the web driver list
*/
public static void closeDrivers(List<WebDriver> webDriverList) {
logger.info("closeDrivers: closing down " + webDriverList.size() + " webDrivers");
for (WebDriver webDriver : webDriverList)
try {
// Open about:config in case of fennec (Firefox for Android) and close.
if (((RemoteWebDriver) webDriver).getCapabilities().getBrowserName()
.equalsIgnoreCase("fennec")) {
webDriver.get("about:config");
webDriver.close();
if (!webDriverList.isEmpty()) {
logger.info("closeDrivers: closing down " + webDriverList.size() + " webDrivers");
for (WebDriver webDriver : webDriverList) {
try {
// Open about:config in case of fennec (Firefox for Android) and close.
if (((RemoteWebDriver) webDriver).getCapabilities().getBrowserName()
.equalsIgnoreCase("fennec")) {
webDriver.get("about:config");
webDriver.close();
}
webDriver.quit();
} catch (Exception e) {
logger.error("Exception while closing/quitting the WebDriver", e);
}
webDriver.quit();
} catch (Exception e) {
logger.error("Exception while closing/quitting the WebDriver", e);
}
// prevent this get called more than once
webDriverList.clear();
}
}

/**
Expand Down

0 comments on commit 9fe6da7

Please sign in to comment.