Playwright Course Online | Playwright Automation Online Training - PowerPoint PPT Presentation

About This Presentation
Title:

Playwright Course Online | Playwright Automation Online Training

Description:

Playwright Course in Hyderabad, India. Visualpath provides Best Playwright Online Training by IT 5-10+ yr in industrial real time experts. Call on +91-9989971070. Telegram: WhatsApp : Visit : – PowerPoint PPT presentation

Number of Views:1
Slides: 10
Provided by: jayanth.visualpath
Tags:

less

Transcript and Presenter's Notes

Title: Playwright Course Online | Playwright Automation Online Training


1
Running Playwright Test With Playwright Test
Runner
www.visualpath.in
2
Playwright is a Node library for automating
browsers, and Playwright Test is a test runner
built on top of Playwright. - To set up
Playwright Test Runner - you can follow these
general steps 1. Install Node.js - Ensure that
you have Node.js installed on your machine. -
You can download it from nodejs.org(https//node
js.org/).
2. Initialize a new Node.js project - Open a
terminal in your project's directory and run the
following commands.
www.visualpath.in
3
- To create a new package.json file bash
npm init -y 3. Install Playwright and
Playwright Test - Install the Playwright and
Playwright Test packages using npm bash npm
install --save-dev playwright playwright-test
4. Configure Playwright Test in package.json
- Open your package.json file and add a test
script that runs Playwright Test.
www.visualpath.in
4
- Update the "scripts" section json
"scripts" "test" "playwright test" 5.
Write a test file - Create a directory for your
tests (e.g., tests) and add a test file inside
it. - For example, create a file named
example.test.js javascript const test,
expect require('_at_playwright/test')
www.visualpath.in
5
test('example test', async ( page ) gt await
page.goto('https//example.com') await
expect(page).toHaveTitle('Example Domain') )
6. Run your tests Execute the following
command in the terminal to run your tests
bash npm test - Playwright Test Runner
will launch a browser, run your test. - provide
the results in the terminal.
www.visualpath.in
6
7. Custom Configuration (Optional) - You can
customize your Playwright Test configuration by
creating a playwright.config.js file in your
project's root. - For example javascript
module.exports projects name
'desktop', use ... , ,
www.visualpath.in
7
name 'mobile', use ... , , ,
- Here, you can configure different browser
contexts, devices, etc., for each test project. -
That's it! You've set up Playwright Test Runner
and written a basic test. - You can expand on
this foundation by writing more tests, exploring
Playwright's APIs. - And customizing your test
environment as needed.
www.visualpath.in
8
CONTACT
For More Information About
Playwright Automation Training
Address- Flat no 205, 2nd Floor,
Nilagiri Block, Aditya EnclaVe,
Ameerpet, Hyderabad-16
Ph No 91-9989971070 Visit
www.visualpath.in E-Mail
online_at_visualpath.in
www.visualpath.in
9
THANK YOU
www.visualpath.in
Write a Comment
User Comments (0)
About PowerShow.com