CodeceptJS icon indicating copy to clipboard operation
CodeceptJS copied to clipboard

[Question] How to switch context to "NATIVE_APPS" for android testing in CodeceptJS

Open shrikanthkm07 opened this issue 9 years ago • 1 comments

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 --verbose mode 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

shrikanthkm07 avatar Apr 26 '17 05:04 shrikanthkm07

It will be availible when Appium support will be released for CodeceptJS. Now you can test this using master version of Codeceptjs

APshenkin avatar Jun 29 '17 14:06 APshenkin