Skip to content

Commit 3767a94

Browse files
Improved Part 2 instructions
1 parent 7af7281 commit 3767a94

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

workshop/2-first-steps.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ However, the `pytest-playwright` plugin takes care of these things automatically
4646
* The `context` fixture provides a new browser context for a test.
4747
* The `page` fixture provides a new browser page for a test.
4848

49-
All of the Playwright calls with `pytest-playwright` use the synchronous API instead of the async API.
50-
The `browser` fixture has session scope, meaning all tests will share one browser instance.
51-
The `context` and `page` fixtures have function scope, meaning each test gets new ones.
49+
All the Playwright calls with `pytest-playwright` use the synchronous API instead of the async API.
50+
The `browser` fixture has *session* scope, meaning all tests will share one browser instance.
51+
The `context` and `page` fixtures have *function* scope, meaning each test gets new ones.
5252
Typically, a test will only need to call the `page` fixture directly.
5353
These fixtures will also automatically clean up everything after testing is complete.
5454
You do not need to explicitly close the browser.
@@ -66,13 +66,13 @@ To this:
6666
def test_basic_duckduckgo_search(page):
6767
```
6868

69-
70-
## Navigating to a web page
71-
7269
Now the test has access to a fresh page in a new browser context.
7370
If we write multiple tests, each test will get its own page and context,
7471
but they will all share the same browser instance.
7572

73+
74+
## Navigating to a web page
75+
7676
Now that we have a page, let's do something on it!
7777
Our first test step is, "Given the DuckDuckGo home page is displayed".
7878
Let's [navigate](https://playwright.dev/python/docs/navigations) to the DuckDuckGo home page like this:

0 commit comments

Comments
 (0)