Giter Site home page Giter Site logo

playwrighttest01's Introduction

Introduction to PlayWright

I'm starting to learn Playwright. It is a promising test automation tool. The great thing is that you can use many programming languages to use PlayWright. The languages supported by the Playwright are given below:

  1. JavaScript
  2. Java
  3. C#
  4. Python

PlayWright also provides excellent tools for debugging tests in real-time. You can also produce test run recordings and logs with detailed screenshots. Other than UI testing, you can also test APIs with Playwright.

How to enable debugging through PowerShell:

$env:PWDEBUG=1

How to disable debugging through PowerShell:

$env:PWDEBUG=0

How to see trace (if enabled) through PowerShell:

.\playwright.ps1 show-trace

How to enable headless mode through Powershell:

$env:HEADED="1"

How to disable headless mode through Powershell:

$env:HEADED="0"

How to run tests with specific run settings file

dotnet test --settings:chromium.runsettings

Important note about running tests via GitHub Actions/Azure, etc.

Running on Ubuntu VMs is headless mode, which is supported by default. To run non-headless mode, you must set up X GUI. Extra frills!

How to launch code-generator

.\bin\debug\net6.0\playwright.ps1 codegen google.com

How to launch trace viewer

.\bin\Debug\net6.0\playwright show-trace .\bin\Debug\net6.0\playwright-traces\PlaywrightTest01.PlaywrightAutomation01.OpenGoogleAndSearchTest.zip

Note

--save-storage With npx playwright codegen allows you to preserve authenticated state by saving cookies and localStorage. Super handy for recording tests with common authentication steps!

Enable verbose for API testing

$env:DEBUG="pw:api"

playwrighttest01's People

Contributors

naeemakram avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.