codeceptjs / codeceptjs/CodeceptJS

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

Đang mở
#2,551 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
4.2k
Fork
757
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
16

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.