Skip to content

Add support for webdriver.io timeouts - #258

Merged
DavertMik merged 1 commit into
codeceptjs:masterfrom
easternbloc:feature/webdriver-io-timeouts
Oct 18, 2016
Merged

Add support for webdriver.io timeouts#258
DavertMik merged 1 commit into
codeceptjs:masterfrom
easternbloc:feature/webdriver-io-timeouts

Conversation

@easternbloc

@easternbloc easternbloc commented Oct 14, 2016

Copy link
Copy Markdown
Contributor

This adds support for each possible timeouts option in webdriver.io

In your codecept.conf.js you can express it something like:

{
  ...
  WebDriverIO: {
    url: 'http://localhost:8080',
    browser: 'phantomjs',
    timeouts: {
      implicit: 10000,
     'page load': 20000
      script: 5000
    }
  }
}

This adds support for each possible timeouts option in webdriver.io

In your codecept.conf.js you can express it something like:

```
{
  ...
  WebDriverIO: {
    url: 'http://localhost:8080',
    browser: 'phantomjs',
    timeouts: {
      implicit: 10000,
      page_load: 20000
      script: 5000
    }
  }
}
```
@DavertMik

Copy link
Copy Markdown
Contributor

Wow, thanks. Those options should be documented as well, I think I can do it.

@DavertMik
DavertMik merged commit cf432f5 into codeceptjs:master Oct 18, 2016
@easternbloc
easternbloc deleted the feature/webdriver-io-timeouts branch October 18, 2016 15:44
@easternbloc

Copy link
Copy Markdown
Contributor Author

thanks!

@DavertMik

Copy link
Copy Markdown
Contributor

I think this should options should be defined per tests, as well. Or inside the code...
It would be useful to define special timeout settings before some heavy pages or data to be loaded

@easternbloc

Copy link
Copy Markdown
Contributor Author

@DavertMik yeah although I think some of the timeouts once set run for the duration of the webdriver instance so not quite sure how that'd play out...

@DavertMik

DavertMik commented Oct 18, 2016

Copy link
Copy Markdown
Contributor

Probably we need more methods to be added to do this, like:

I.setTimeout({ script: 5000 });

@DavertMik

Copy link
Copy Markdown
Contributor

better to call this function another way for not to be confused with real setTimeout ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants