Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
martingrossmann committed Jun 12, 2024
1 parent c661681 commit 40a003b
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public WebDriverRequest prepareWebDriverRequest(WebDriverRequest webDriverReques
finalRequest = new AppiumDriverRequest();
finalRequest.setSessionKey(webDriverRequest.getSessionKey());
finalRequest.setBrowser(webDriverRequest.getBrowser());
// finalRequest.setBrowserVersion(webDriverRequest.getBrowserVersion());
}

MutableCapabilities requestCapabilities = finalRequest.getMutableCapabilities();
Expand Down Expand Up @@ -107,7 +106,7 @@ public WebDriverRequest prepareWebDriverRequest(WebDriverRequest webDriverReques
log().info("No mobile browser requested.");
}

// Any additional defined desired capabilities are merged into browser options
// Any additional defined desired capabilities are merged into base options
baseOptions = baseOptions.merge(finalRequest.getDesiredCapabilities());
baseOptions = baseOptions.merge(finalRequest.getMutableCapabilities());
finalRequest.setCapabilities(baseOptions);
Expand All @@ -132,12 +131,6 @@ private WebDriver startNewAppiumSession(WebDriverRequest webDriverRequest, Sessi
AppiumDriverRequest appiumDriverRequest = (AppiumDriverRequest) webDriverRequest;
Capabilities requestCapabilities = appiumDriverRequest.getCapabilities();
URL appiumUrl = appiumDriverRequest.getServerUrl().get();
// DesiredCapabilities finalCapabilities = new DesiredCapabilities(requestCapabilities);

// IExecutionContextController executionContextController = Testerra.getInjector().getInstance(IExecutionContextController.class);
// DefaultCapabilityUtils utils = new DefaultCapabilityUtils();

// utils.putIfAbsent(requestCapabilities, AppiumDriverRequest.CAPABILITY_NAME_TEST_NAME, executionContextController.getExecutionContext().getRunConfig().getReportName());

AppiumDriver appiumDriver = null;
Platform mobilePlatform = new MobileOsChecker().getPlatform(webDriverRequest);
Expand All @@ -156,7 +149,6 @@ private WebDriver startNewAppiumSession(WebDriverRequest webDriverRequest, Sessi
sessionContext.setActualBrowserName(appiumDeviceQuery.getBrowserName());
} else {
throw new RuntimeException("Cannot create new Appium session - ambiguous capabilities found:\n " + requestCapabilities.toString());
// throw new RuntimeException("Mobile Browser not supported: " + webDriverRequest.getBrowser());
}
return appiumDriver;
}
Expand Down

0 comments on commit 40a003b

Please sign in to comment.