Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
docs: browser agent
Browse files Browse the repository at this point in the history
  • Loading branch information
eGavr committed Jun 6, 2017
1 parent 7d18e50 commit 765bd63
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Utility which contains common modules for [gemini](https://github.com/gemini-tes
- [Options](#options)
- [Sets](#sets)
- [BrowserPool](#browserpool)
- [BrowserAgent](#browseragent)
- [Errors](#errors)
- [CancelledError](#cancellederror)

Expand Down Expand Up @@ -134,6 +135,22 @@ return pool.getBrowser('bro')

```

### BrowserAgent

Example:
```js
const BrowserAgent = require('gemini-core').BrowserAgent;
const BrowserPool = require('gemini-core').BrowserPool;
const pool = BrowserPool.create(/*BrowserManager, config*/);
const browserAgent = BrowserAgent.create('bro-id', pool);

return browserAgent.getBrowser()
.then((bro) => {
...
return browserAgent.freeBrowser(bro/*, {force: true}*/);
});
```

### Errors

#### CancelledError
Expand Down

0 comments on commit 765bd63

Please sign in to comment.