Skip to content

Commit

Permalink
Update Expect API Docs to add two matchers (#5678)
Browse files Browse the repository at this point in the history
  • Loading branch information
klamping committed Aug 2, 2020
1 parent 0b47211 commit 7ff193e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/api/expect.md
Expand Up @@ -51,6 +51,17 @@ browser.url('https://webdriver.io/')
expect(browser).toHaveUrl('https://webdriver.io')
```

### toHaveUrlContaining

Checks if browser is on a page URL that contains a value.

##### Usage

```js
browser.url('https://webdriver.io/')
expect(browser).toHaveUrlContaining('webdriver')
```

### toHaveTitle

Checks if website has a specific title.
Expand All @@ -62,6 +73,17 @@ browser.url('https://webdriver.io/')
expect(browser).toHaveTitle('WebdriverIO · Next-gen browser and mobile automation test framework for Node.js')
```

### toHaveTitleContaining

Checks if website has a specific title that contains a value.

##### Usage

```js
browser.url('https://webdriver.io/')
expect(browser).toHaveTitleContaining('WebdriverIO')
```

## Element Matchers

### toBeDisplayed
Expand Down

0 comments on commit 7ff193e

Please sign in to comment.