Skip to content

Commit

Permalink
docs: added overview links
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman committed May 3, 2020
1 parent 22e7513 commit eed2bac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
### Table of contents

1. [Getting Started](./intro.md)
- [Introduction](./intro.md)
- [Installation](./installation.md)
1. [Core Concepts](./core-concepts.md)
- [Overview](./core-concepts.md)
- [Browser](./core-concepts.md#browser)
- [Browser contexts](./core-concepts.md#browser-contexts)
- [Pages and frames](./core-concepts.md#pages-and-frames)
Expand All @@ -22,13 +24,15 @@
- [Upload files](./input.md#upload-files)
- [Focus element](./input.md#focus-element)
1. [Emulation](./emulation.md)
- [Overview](./emulation.md)
- [User agent](./emulation.md#user-agent)
- [Viewport, color scheme](./emulation.md#viewport-color-scheme)
- [Devices](./emulation.md#devices)
- [Locale & Timezone](./emulation.md#locale--timezone)
- [Permissions](./emulation.md#permissions)
- [Geolocation](./emulation.md#geolocation)
1. [Network](./network.md)
- [Overview](./network.md)
- [HTTP Authentication](./network.md#http-authentication)
- [Handle file downloads](./network.md#handle-file-downloads)
- [Network events](./network.md#network-events)
Expand All @@ -41,6 +45,7 @@
- [Page events](./verification.md#page-events)
- [Handling exceptions](./verification.md#handling-exceptions)
1. [Navigation and Loading](./loading.md)
- [Overview](./loading.md)
- [Common scenarios](./loading.md#common-scenarios)
- [Loading a popup](./loading.md#loading-a-popup)
- [Client-side redirects](./loading.md#unusual-client-side-redirects)
Expand Down
8 changes: 4 additions & 4 deletions docs/loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Playwright logically splits the process of showing a new document in the page into **navigation** and **loading**.

### Navigation
## Navigation

Page navigation can be either initiated by the Playwright call:

Expand All @@ -29,7 +29,7 @@ history.pushState({}, 'title', '#deep-link');

Navigation intent may result in being canceled, for example transformed into a download or hitting an unresolved DNS address. Only when the navigation succeeds, page starts **loading** the document.

### Loading
## Loading

Page load takes time retrieving the response body over the network, parsing, executing the scripts and firing the events. Typical load scenario goes through the following load states:
- [`page.url()`](api.md#pageurl) is set to the new url
Expand All @@ -40,7 +40,7 @@ Page load takes time retrieving the response body over the network, parsing, exe
- page executes dynamically loaded scripts
- `networkidle` is fired - no new network requests made for at least `500` ms

### Common scenarios
## Common scenarios

By default, Playwright handles navigations seamlessly so that you did not need to think about them. Consider the following scenario, where everything is handled by Playwright behind the scenes:

Expand All @@ -62,7 +62,7 @@ await page.click('text=Login');

Explicit loading handling may be required for more complicated scenarios though.

### Loading a popup
## Loading a popup

When popup is opened, explicitly calling [`page.waitForLoadState()`](api.md#pagewaitforloadstatestate-options) ensures that popup is loaded to the desired state.
```js
Expand Down

0 comments on commit eed2bac

Please sign in to comment.