Skip to content

Commit 0423a85

Browse files
committed
removed cli option
1 parent c18e8ad commit 0423a85

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

src/test/java/com/browserstack/BrowserStackRemoteTest.java

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,8 @@ public class BrowserStackRemoteTest {
2626
@SuppressWarnings("unchecked")
2727
public void setUp(String config_file, String platform) throws Exception {
2828
JSONParser parser = new JSONParser();
29-
JSONObject config;
30-
JSONArray platforms;
31-
if (!config_file.isEmpty()) {
32-
config = (JSONObject) parser.parse(new FileReader("src/test/resources/conf/" + config_file));
33-
platforms = (JSONArray) config.get("platforms");
34-
} else {
35-
config = (JSONObject) parser.parse("{}");
36-
String cliHub = System.getProperty("hub");
37-
if (cliHub.isEmpty()) {
38-
cliHub = "hub.browserstack.com";
39-
}
40-
config.put("server", cliHub);
41-
String cliUser = System.getProperty("userName");
42-
if (!cliUser.isEmpty()) {
43-
config.put("user", cliUser);
44-
}
45-
String cliKey = System.getProperty("accessKey");
46-
if (!cliKey.isEmpty()) {
47-
config.put("key", cliKey);
48-
}
49-
JSONObject cliCaps = (JSONObject) parser.parse(System.getProperty("caps").replaceAll("'", "\""));
50-
config.put("capabilities", cliCaps);
51-
JSONArray cliplatforms = (JSONArray) parser.parse(System.getProperty("platforms").replaceAll("'", "\""));
52-
platforms = cliplatforms;
53-
}
29+
JSONObject config = (JSONObject) parser.parse(new FileReader("src/test/resources/conf/" + config_file));
30+
JSONArray platforms = (JSONArray) config.get("platforms");;
5431

5532
DesiredCapabilities capabilities = new DesiredCapabilities();
5633
Map<String, String> envCapabilities = (Map<String, String>) platforms.get(Integer.parseInt(platform));

0 commit comments

Comments
 (0)