Skip to content

Commit 9585ed4

Browse files
kamal-kaur04francisf
authored andcommitted
move browserName outside bstack:options
1 parent 930f9cb commit 9585ed4

File tree

6 files changed

+12
-26
lines changed

6 files changed

+12
-26
lines changed

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ plugins {
55
repositories { mavenCentral() }
66

77
dependencies {
8-
compile 'org.testng:testng:6.9.10'
9-
compile 'commons-io:commons-io:1.3.2'
10-
compile 'org.seleniumhq.selenium:selenium-java:3.12.0'
11-
compile 'com.browserstack:browserstack-local-java:0.1.0'
12-
compile 'com.googlecode.json-simple:json-simple:1.1.1'
8+
implementation 'org.testng:testng:6.9.10'
9+
implementation 'commons-io:commons-io:1.3.2'
10+
implementation 'org.seleniumhq.selenium:selenium-java:4.1.0'
11+
implementation 'com.browserstack:browserstack-local-java:0.1.0'
12+
implementation 'com.googlecode.json-simple:json-simple:1.1.1'
1313
}
1414

1515
group = 'com.browserstack'

src/test/java/com/browserstack/BrowserStackTestNGTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void setUp(String config_file, String environment) throws Exception {
6262

6363
if (capabilities.getCapability("bstack:options") != null) {
6464
HashMap bstackOptionsMap = (HashMap) capabilities.getCapability("bstack:options");
65-
if (bstackOptionsMap.get("local").toString().equalsIgnoreCase("true")) {
65+
if (bstackOptionsMap.get("local") != null && bstackOptionsMap.get("local").toString().equalsIgnoreCase("true")) {
6666
l = new Local();
6767
Map<String, String> options = new HashMap<String, String>();
6868
options.put("key", accessKey);

src/test/resources/conf/local.conf.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414

1515
"environments": {
1616
"chrome": {
17-
"bstack:options": {
1817
"browserName": "chrome"
19-
}
2018
}
2119
}
2220
}

src/test/resources/conf/parallel.conf.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,16 @@
1414

1515
"environments": {
1616
"env1": {
17-
"bstack:options": {
1817
"browserName": "chrome"
19-
}
2018
},
2119
"env2": {
22-
"bstack:options": {
2320
"browserName": "firefox"
24-
}
2521
},
2622
"env3": {
2723
"bstack:options": {
28-
"os": "OS X",
29-
"browserName": "safari"
30-
}
24+
"os": "OS X"
25+
},
26+
"browserName": "safari"
3127
}
3228
}
3329
}

src/test/resources/conf/single.conf.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414

1515
"environments": {
1616
"chrome": {
17-
"bstack:options": {
1817
"browserName": "chrome"
19-
}
2018
}
2119
}
2220
}

src/test/resources/conf/suite.conf.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,19 @@
1313

1414
"environments": {
1515
"chrome": {
16-
"bstack:options": {
1716
"browserName": "chrome"
18-
}
1917
},
2018
"firefox": {
21-
"bstack:options": {
2219
"browserName": "firefox"
23-
}
2420
},
2521
"safari": {
2622
"bstack:options": {
27-
"os": "OS X",
28-
"browserName": "safari"
29-
}
23+
"os": "OS X"
24+
},
25+
"browserName": "safari"
3026
},
3127
"ie": {
32-
"bstack:options": {
3328
"browserName": "internet explorer"
34-
}
3529
}
3630
}
3731
}

0 commit comments

Comments
 (0)