Skip to content

Commit 06a718e

Browse files
Improved Part 1 guide
1 parent ca970c1 commit 06a718e

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

workshop/1-getting-started.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Part 1: Getting started
22

3-
Part 1 of the workshop explains how to start testing with Playwright and pytest in Python.
3+
Part 1 of the workshop explains how to set up a Python test automation project with pytest and Playwright.
44

55

66
## What is Playwright?
@@ -62,13 +62,10 @@ to manage dependency packages locally:
6262

6363
```bash
6464
$ python3 -m venv venv
65-
$ source venv/bin/activate
6665
```
6766

6867
Creating a new virtual environment for each Python project is a recommended practice.
6968
This command will create a subdirectory named `venv` that holds all virtual environment files, including dependency packages.
70-
After creating a virtual environment, you must "activate" it to use it using the `source` command shown above.
71-
You can tell if a virtual environment is active if its name appears in the bash prompt.
7269

7370
*A note about Python commands:*
7471
Python has two incompatible major versions: 2 and 3.
@@ -77,6 +74,21 @@ For example, macOS comes bundled with Python 2.7.18.
7774
Sometimes, the `python` executable may point to Python 2 instead of 3.
7875
To be precise about versions and executables, we will use the `python3` and `pip3` commands explicitly in this workshop.
7976

77+
After creating a virtual environment, you must "activate" it.
78+
On macOS or Linux, use the following command:
79+
80+
```bash
81+
$ source venv/bin/activate
82+
```
83+
84+
The equivalent command for a Windows command line is:
85+
86+
```
87+
> venv\Scripts\activate.bat
88+
```
89+
90+
You can tell if a virtual environment is active if its name appears in the prompt.
91+
8092
Let's add some Python packages to our new virtual environment:
8193

8294
```bash

0 commit comments

Comments
 (0)