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

Commit

Permalink
docs: add api documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
clebert committed Apr 4, 2017
1 parent e52dd36 commit a51ebb1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Expand Up @@ -159,6 +159,7 @@ If you write your tests with [TypeScript][18], it is recommended to enable the [
* [`setWindowPosition`](#setwindowposition)
* [`setWindowSize`](#setwindowsize)
* [`sleep`](#sleep)
* [`takeScreenshot`](#takescreenshot)
* [Interface `Element`](#interface-element)
* [`tagName`](#tagname)
* [`text`](#text)
Expand Down Expand Up @@ -668,6 +669,24 @@ test('foo', async t => {
});
```

#### [`takeScreenshot`](#api)

Type definition:

- **`takeScreenshot(): Action`**

Example [TAP][28] output: `ok 1 - take screenshot 'screenshots/07cc9369-ab10-4221-9bc9-18ad12b87c7c.png' (attempt 1 of 5)`

Example usage:

```ts
const {browser, test} = require('cybernaut');

test('foo', async t => {
await t.perform(browser.takeScreenshot());
});
```

### [Interface `Element`](#api)

#### [`tagName`](#api)
Expand Down

0 comments on commit a51ebb1

Please sign in to comment.