Our team is using saucelabs to run mobile test scripts against a variety of real remote mobile devices. As part of this testing we require switching between the appium mobile driver and the selenium web driver - there exist certain actions we perform in the web driver, and then switch back to the mobile driver to verify outcome of said web driver action.
That being said, we cannot make this sort of functionality work (nor can we find any documentation regarding this). Here’s our configuration:
- Android desired capabilities set up through Project > Settings > Desired Capabilities > Custom
- We know this functionality works fine - our mobile scripts are running on real devices no problem
- Test suite collection set up with following configuration:
- “Run with” set to the various custom mobile capabilities (i.e. android tablet running version 9)
- “Profile” set to our desired execution profile
- The test suite run in the test suite collection consists of 3 different test cases; first 2 test cases running on mobile device, and the last in chrome browser. Here’s what the setup block of the test suite:
def setUp() {
System.setProperty('webdriver.chrome.driver', DriverFactory.getChromeDriverPath())
GlobalVariable.MCDriver = new ChromeDriver()
DriverFactory.changeWebDriver(GlobalVariable.MCDriver)
}
-
The test suite collection fails out immediately at the first test case; as I mentioned, the first test case is a mobile test case, and starts with:
Mobile.startApplication(GlobalVariable.androidApplication, false)
-
It bears repeating that the mobile test cases run without issue until I try to introduce a web driver
Any help on this would be much appreciated