[Question] How to switch context to "NATIVE_APPS" for android testing in CodeceptJS
What are you trying to achieve?
I want to switch the context to "NATIVE_APPS" while testing on Android Emulator for website testing.
What do you get instead?
I didn't find a way to do it in CodeceptJS way.
Provide console output if related. Use
--verbosemode for more details.
Test cases fail until context is switched to "NATIVE_APPS" for website testing
Provide test source code if related
This is how it can be done using WebDriverIO way.
driver.contexts().then(function (contexts) { // get list of available views. Returns array: ["NATIVE_APP","WEBVIEW_1"] return driver.context(contexts[1]); // choose the webview context }) // do some web testing .elementsByCss('.green_button').click() .context('NATIVE_APP') // leave webview context // do more native stuff here if we want .quit() // stop webdrivage
But how to achieve this in codeceptJS configs.
Details
- CodeceptJS version:
- NodeJS Version:
- Operating System:
- Protractor || WebDriverIO || Nightmare version (if related)
- Configuration file:codecept.conf.js
# paste suite config here
It will be availible when Appium support will be released for CodeceptJS. Now you can test this using master version of Codeceptjs