Skip to content

Commit b900aac

Browse files
Merge branch '2-first-steps' into 3-assertions
2 parents 5328350 + 79608e6 commit b900aac

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Playwright tests can set up *much* faster than traditional Web UI tests.
1818

1919
In this tutorial, we will build a [Python](https://www.python.org/)
2020
test automation project from the ground up using Playwright.
21-
We will automate web search engine tests together step-by-step
21+
We will automate web tests together step-by-step
2222
using Playwright for interactions and pytest for execution.
2323
We'll also explore Playwright tricks
2424
like cross-browser testing, capturing videos, and even running tests in parallel!
@@ -37,8 +37,8 @@ Some of the nice features Playwright offers include:
3737
* very fast execution times (compared to other browser automation tools)
3838
* cross-browser and mobile emulation support
3939
* automatic waiting
40-
* built-in API calls
4140
* screenshots and video capture
41+
* built-in API calls
4242

4343
Microsoft is actively developing Playwright,
4444
so new features are coming all the time!
@@ -60,7 +60,7 @@ I also have given (or will be giving) this tutorial as a live workshop at the fo
6060

6161
## Outline
6262

63-
This tutorial has five main parts, each with three sections:
63+
This tutorial has six main parts, each with three sections:
6464

6565
1. Getting started
6666
1. What is Playwright?
@@ -82,6 +82,10 @@ This tutorial has five main parts, each with three sections:
8282
1. Testing different browsers
8383
2. Capturing screenshots and videos
8484
3. Running tests in parallel
85+
6. Testing with APIs
86+
1. API setup
87+
2. Writing a pure API test
88+
3. Writing a hybrid UI/API test
8589

8690

8791
## Prerequisites
@@ -98,6 +102,9 @@ You should also have a decent Python editor like
98102
[Visual Studio Code](https://code.visualstudio.com/docs/languages/python)
99103
or [PyCharm](https://www.jetbrains.com/pycharm/).
100104

105+
If you wish to complete Part 6 ("Testing with APIs"),
106+
then you will need a [GitHub](https://github.com/) account.
107+
101108

102109
## Example code branches
103110

@@ -113,4 +120,5 @@ The branch names are:
113120
| Part 3 | 3-assertions |
114121
| Part 4 | 4-page-objects |
115122
| Part 5 | 5-playwright-tricks |
123+
| Part 6 | 6-api-testing |
116124
| Complete | main |

tutorial/2-first-steps.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ 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.
5555

56+
> Playwright supports both synchronous and asynchronous calls for Python.
57+
> Synchronous calls are sufficient for almost all test automation needs.
58+
> Asynchronous calls could be useful for other types of automation, such as web scraping.
59+
5660
Let's update our test stub to call the `page` fixture.
5761
In `tests/test_search.py`, change the test function signature from this:
5862

0 commit comments

Comments
 (0)