codeceptjs / codeceptjs/CodeceptJS

Tests install App and then restarts, never making a connection

Đang mở
#2,575 0 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?
Running tests in Appium with IOS
#### What do you get instead?
Running tests install the app but then restarts it and no connection is made, it restarts multiple times, and I get to see theLogin Screen but goes back to home screen immediately
> Provide console output if related. Use `--verbose` mode for more details.

```bash
Select a Station
Emitted | test.before ([object Object])
2020-09-10T07:53:48.724Z ERROR webdriver: Request failed with status 200 due to Error: Response has empty body
2020-09-10T07:53:48.725Z ERROR webdriver: Error: Response has empty body
at getErrorFromResponseBody (/Users/javierjimeno/E2ETesting/node_modules/webdriverio/node_modules/webdriver/build/utils.js:110:12)
at WebDriverRequest._request (/Users/javierjimeno/E2ETesting/node_modules/webdriverio/node_modules/webdriver/build/request.js:149:56)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async startWebDriverSession (/Users/javierjimeno/E2ETesting/node_modules/webdriverio/node_modules/webdriver/build/utils.js:41:16)
at async Function.newSession (/Users/javierjimeno/E2ETesting/node_modules/webdriverio/node_modules/webdriver/build/index.js:44:23)
at async Object.remote (/Users/javierjimeno/E2ETesting/node_modules/webdriverio/build/index.js:75:20)
at async Appium._startBrowser (/Users/javierjimeno/2ETesting/node_modules/codeceptjs/lib/helper/Appium.js:234:24)
[1] Error | Error: Can't connect to WebDriver.
Error: Failed to create session.
Make sure to connect to valid hostname:port or the port is not in use.
If you use a grid server
Make sure to add vendor prefix like "goog:", "appium:", "moz:", etc to non W3C capabilities.
See more https://www.w3.org/TR/webdriver/#capabilities

Please make sure Selenium Server (ChromeDriver or PhantomJS) is running and accessible
Emitted | test.failed ([object Object])
✖ "before each" hook: codeceptjs.before for "Select a Station" in 52180ms
[1] Error | Error: Can't connect to WebDriver.
Error: Failed to create session.
Make sure to connect to valid hostname:port or the port is not in use.
If you use a grid server
Make sure to add vendor prefix like "goog:", "appium:", "moz:", etc to non W3C capabilities.
See more https://www.w3.org/TR/webdriver/#capabilities

Please make sure Selenium Server (ChromeDriver or PhantomJS) is running and accessible
Error: Can't connect to WebDriver.
Error: Failed to create session.
Make sure to connect to valid hostname:port or the port is not in use.
If you use a grid server
Make sure to add vendor prefix like "goog:", "appium:", "moz:", etc to non W3C capabilities.
See more https://www.w3.org/TR/webdriver/#capabilities

Please make sure Selenium Server (ChromeDriver or PhantomJS) is running and accessible
```

> Provide test source code if related

```js
// paste test
```

### Details

* CodeceptJS version: 2.6.10
* NodeJS Version: 14.1.0
* Operating System: macos
* webdriverio 5.23.0
* Configuration file:

```js
exports.config = {
tests: './*_test.js',
output: './output',
helpers: {
Appium: {
app: `/Users/${require("os").userInfo().username}/Library/Developer/Xcode/DerivedData/Build/Products/Release-iphonesimulator/ABC.app`,
platform: 'iOS',
device: 'iPad Pro (12.9-inch)',
desiredCapabilities: {
automationName: 'XCUITest',
platformVersion: "12.4"
}
},
ChaiWrapper : {
require: 'codeceptjs-chai'
},
CmdHelper: {
require: 'codeceptjs-cmdhelper'
},
Common: {
require: './Helpers/common_helper.js',
}
},
include: {
I: './steps_file.js'
},
gherkin: {
features: './features/*.feature',
steps: ['./step_definitions/steps.js']
},
bootstrap: null,
mocha: {},
name: 'E2ETesting',
plugins: {
retryFailedStep: {
enabled: true
},
screenshotOnFail: {
enabled: true
}
}
}
```
Appium Logs:
https://gist.github.com/javjim/83a9e66b1d47b8f6ef2183802e3cbb57

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.