Skip to content

Commit

Permalink
update docs in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jesg committed Jul 31, 2017
1 parent 2c3ac9e commit 4348e4f
Showing 1 changed file with 35 additions and 5 deletions.
40 changes: 35 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,42 @@ available page load strategies:
- interactive
- complete (default)

All the page load strategies but none correspond to the `document.readyState`. The none strategy does not wait for anything.

The default page load strategy can be overridden globally by setting `driver.pageLoadStrategy`.

The default timeout is 300,000 ms (5 minutes). It can be overridded globally by setting `driver.timeouts.pageLoad`.

**Parameters**

- `args`

**Examples**

```javascript
await driver.navigate({url: 'http://google.com', pageLoadStrategy: 'interactive'})
await driver.navigate({url: 'http://google.com', pageLoadStrategy: 'interactive', timeout: 1000})
// or
await driver.navigate('http://google.com')
```

### waitForPageLoad

Wait for an action to trigger a page load.

The action should return a `Promise`.

**Parameters**

- `args`

**Examples**

```javascript
await driver.waitForPageLoad({action: () => { return driver.reload() }, pageLoadStrategy: 'interactive', timeout: 200})
or
await driver.waitForPageLoad(() => { return node.click() })
```

### title

Get the title of the current page
Expand Down Expand Up @@ -101,10 +125,16 @@ Reload the current page

available page load strategies:

none
loading
interactive
complete (default)
- none
- loading
- interactive
- complete (default)

All the page load strategies but none correspond to the `document.readyState`. The none strategy does not wait for anything.

The default page load strategy can be overridden globally by setting `driver.pageLoadStrategy`.

The default timeout is 300,000 ms (5 minutes). It can be overridded globally by setting `driver.timeouts.pageLoad`.

**Parameters**

Expand Down

0 comments on commit 4348e4f

Please sign in to comment.