File tree 1 file changed +16
-10
lines changed
source/src/main/java/org/cerberus/core/engine/execution/impl
1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -1180,16 +1180,22 @@ public boolean stopServer(TestCaseExecution tce) {
1180
1180
1181
1181
// We Stop the Robot Session (Selenium or Appium).
1182
1182
LOG .info ("Stop execution robot session" );
1183
- if (tce .getRobotProvider ().equals (TestCaseExecution .ROBOTPROVIDER_KOBITON )) {
1184
- // For Kobiton, we should first close Appium session.
1185
- if (session .getAppiumDriver () != null ) {
1186
- session .getAppiumDriver ().close ();
1187
- }
1188
- if (session .getDriver () != null ) {
1189
- session .getDriver ().quit ();
1190
- }
1191
- } else {
1192
- session .quit ();
1183
+ switch (tce .getRobotProvider ()) {
1184
+ case TestCaseExecution .ROBOTPROVIDER_KOBITON :
1185
+ if (session .getAppiumDriver () != null ) {
1186
+ session .getAppiumDriver ().close ();
1187
+ }
1188
+ if (session .getDriver () != null ) {
1189
+ session .getDriver ().quit ();
1190
+ }
1191
+ break ;
1192
+ case TestCaseExecution .ROBOTPROVIDER_BROWSERSTACK :
1193
+ if (session .getDriver () != null ) {
1194
+ session .getDriver ().quit ();
1195
+ }
1196
+ break ;
1197
+ default :
1198
+ session .quit ();
1193
1199
}
1194
1200
1195
1201
return true ;
You can’t perform that action at this time.
0 commit comments