docs: added overview links

This commit is contained in:
Pavel Feldman 2020-05-03 11:16:52 -07:00
parent 22e7513272
commit eed2bac441
2 changed files with 9 additions and 4 deletions

View file

@ -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)
@ -22,6 +24,7 @@
- [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)
@ -29,6 +32,7 @@
- [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)
@ -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)

View file

@ -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:
@ -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
@ -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:
@ -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