Katalon Studio Version:
KSE 8.2.5, Build 208
Windows 10 Enterprise (64-bit)
Chrome: 97.0.4692.99 (Official Build) (64-bit)
Hi Folks, I have the following included in my Katalon ‘Remote Desired Capabilities’ setup:
Remote Server URL: http://username:xxxxxxxxxxxxxx@hub.lambdatest.com/wd/hub
browserName|String|Chrome
version|String|97.0
platform|String|Windows 10
build|String|TestBuild
name|String|TestName
When I manually execute test cases from “Run > Remote” they run on the ‘Remote Server’ as expected. To run test cases through Katlon (TestCases/TestSuites), I have to set the ‘Default execution browser’ to ‘Remote’. We only have a few test cases that need to be run on the “Remote Server” so I need to have my ‘Default execution browser’ set to ‘Chrome’. Is there a way we can set the 'browserType=‘Remote’ from the test case being executed?
I am using the following TCs to override the Remote Desired Capabilities ‘build’ & ‘name’ settings based on test case run. These work as expected.
//TC02-www.google.com
//Overrides Remote Desired Capabilities
import com.kms.katalon.core.configuration.RunConfiguration as RunConfiguration
RunConfiguration.setDriverPreferencesProperty('Remote', 'browserName', 'Chrome')
RunConfiguration.setDriverPreferencesProperty('Remote', 'version', '97.0')
RunConfiguration.setDriverPreferencesProperty('Remote', 'platform', 'Windows 10')
RunConfiguration.setDriverPreferencesProperty('Remote', 'build', 'BuildOne')
RunConfiguration.setDriverPreferencesProperty('Remote', 'name', 'TC01-www.google.com')
//Opens Google.com
WebUI.openBrowser('')
WebUI.navigateToUrl('https://www.google.com')
WebUI.waitForPageLoad(30)
WebUI.delay(5)
WebUI.closeBrowser()
//TC02-www.google.ca
//Overrides Remote Desired Capabilities
import com.kms.katalon.core.configuration.RunConfiguration as RunConfiguration
RunConfiguration.setDriverPreferencesProperty('Remote', 'browserName', 'Chrome')
RunConfiguration.setDriverPreferencesProperty('Remote', 'version', '97.0')
RunConfiguration.setDriverPreferencesProperty('Remote', 'platform', 'Windows 10')
RunConfiguration.setDriverPreferencesProperty('Remote', 'build', 'BuildOne')
RunConfiguration.setDriverPreferencesProperty('Remote', 'name', 'TC02-www.google.ca')
//Opens Google.ca
WebUI.openBrowser('')
WebUI.navigateToUrl('https://www.google.ca')
WebUI.waitForPageLoad(30)
WebUI.delay(5)
WebUI.closeBrowser()