Playwrite - Basics
KIranuknow

KIranuknow @kiranuknow

Joined:
Nov 15, 2023

Playwrite - Basics

Publish Date: Mar 28
0 0

_How to Install _

  • pip install pytest-playwright
  • playwright install

How to run a program

  • If the file name starts without test*.py then just use this command. ex: file name myusecase.py
$ pytest <>.py
$ pytest myusecase.py
Enter fullscreen mode Exit fullscreen mode
  • If the file name starts with test<>.py then no need to specify the file name when running
$ pytest
Enter fullscreen mode Exit fullscreen mode
  • If you want to see the execution in a browser.
$pytest --headed --browser firefox 
Enter fullscreen mode Exit fullscreen mode
  • Record the flow and copy the code
$playwright codegen https://example.com
Enter fullscreen mode Exit fullscreen mode

Playwrite Documentation: https://playwright.dev/python/docs/actionability

Comments 0 total

    Add comment