Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Expect API Docs to add two matchers #5678

Merged
merged 1 commit into from Aug 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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