Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Calling browser.timeouts() for Safari tests in a hook errors and results in rest of hook not executing #11

Open
christian-bromann opened this issue Jan 25, 2019 · 1 comment
Labels
Bug🐛 help wanted Extra attention is needed v4

Comments

@christian-bromann
Copy link
Contributor

From @jochakovsky on October 31, 2018 1:0

Environment (please complete the following information):

  • WebdriverIO version: 4.14.0
  • Mode: WDIO Testrunner
  • If WDIO Testrunner, running sync/async: sync
  • Node.js version: 8.11.2
  • NPM version: 6.4.1
  • Browser name and version: 12.0.1 (13606.2.104.1.2)
  • Platform name and version: macOS 10.13.6
  • Additional wdio packages used (if applicable):

Config of WebdriverIO
https://github.com/jochakovsky/webdriverio-browser-timeouts-bug

Describe the bug
Calling browser.timeouts() for Safari tests in a hook throws the following error:

Error: Remote end send an unknown status code.
    at timeouts("implicit", 15000) - index.js:263:37
    at init() - runner.js:235:55

For me, I put the call to browser.timeouts() in the before hook, and this error prevented the rest of the hook from executing. In my real project, there are some critical commands run afterwards in the same hook. Since those were skipped, my tests would fail for very hard-to-debug reasons.

No issues setting timeouts in Chrome or Firefox.

To Reproduce
Steps to reproduce the behavior:

Expected behavior
Any of the following:

  • Correctly setting the timeout
  • A clear error message that it is not possible to set the timeout in this browser referencing the line number of the browser.timeouts() call, and the WDIO test runner exits with a failure code
  • A clear error message that it is not possible to set the timeout in this browser referencing the line number of the browser.timeouts() call, and the WDIO test runner continues executing the hook

Copied from original issue: webdriverio/webdriverio#3029

@christian-bromann christian-bromann added help wanted Extra attention is needed Bug🐛 v4 labels Jan 25, 2019
@christian-bromann
Copy link
Contributor Author

@jochakovsky this could be a bug with Safaridriver or the way how WebdriverIO v4 supports Safaridriver. Feel free to propose a fix for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug🐛 help wanted Extra attention is needed v4
Projects
None yet
Development

No branches or pull requests

1 participant