codeceptjs / codeceptjs/CodeceptJS

Passing ios & android locator values for a single command produces different results than if they were run separately

Abierto
#2,551 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
4.2k
Forks
757
Merge medio
2 d 9 h
PR fusionados (30 d)
16

Descripción

#### What are you trying to achieve?
Reduce lines of code & complexity by passing in the `android` and `ios` locators for functions. Example below:
`I.see({ android: this.home_navTab_android, ios: this.home_navTab_ios });`

#### What do you get instead?

Certain commands or selectors fail when using this method. However, I get different results if I use `I.see()` and pass in single OS locator. i.e Call the OS specific functions individually for each platform.

Using `I.see(this.home_navTab_android);`
```
Test output:
expected current context //* to include "#au.com.flexirent.skye:id/navigation_home"
```
Using: `I.see({ android: this.home_navTab_android, ios: this.home_navTab_ios });`
```
Test output:
expected current context //* to include "[object Object]"
```

### Details
```
* CodeceptJS version: ^2.6.7
* NodeJS Version: v14.3.0
* Operating System: Mac 10.15.5
* puppeteer || webdriverio || protractor || testcafe version (if related)
* Configuration file:

Appium: {
host: "0.0.0.0",
port: 4723,
platform: "Android",
newCommandTimeout: 10000,
desiredCapabilities: {
platformName: 'Android',
deviceName: 'any',
udid: 'emulator-5554',
automationName: 'UiAutomator2',
appPackage: '',
appActivity: '',
},
},
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.