Skip to content

Commit

Permalink
docs: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jfgreffier committed Sep 11, 2022
1 parent c20507d commit 98fa373
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/src/mock-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: "Mock APIs"

Playwright provides native support for most of the browser features. However, there are some experimental APIs
and APIs which are not (yet) fully supported by all browsers. Playwright usually doesn't provide dedicated
automation APIs in such cases. You can use mocks to test behavior of your application in such cases. This guide
automation APIs in such cases. You can use mocks to test the behavior of your application in such cases. This guide
gives a few examples.

<!-- TOC -->
Expand All @@ -18,8 +18,7 @@ battery status.

## Creating mocks

Since the page may be calling the API very early while loading it's important to setup all the mocks before the
page started loading. The easiest way to achieve that is to call [`method: Page.addInitScript`]:
Since the page may be calling the API very early while loading it's important to setup all the mocks before the page started loading. The easiest way to achieve that is to call [`method: Page.addInitScript`]:

```js
await page.addInitScript(() => {
Expand Down

0 comments on commit 98fa373

Please sign in to comment.