codeceptjs / codeceptjs/CodeceptJS

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

オープン
#2,551 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
4.2k
フォーク
757
平均マージ
2日 9時間
マージ済み PR(30日)
16

説明

#### 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: '',
},
},
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。