Playwright Automation using Python

Playwright is an open-source automation testing framework developed by Microsoft that enables reliable end-to-end testing for modern web applications. It provides a developer-friendly API and supports multiple programming languages, including JavaScript, TypeScript, Python, and C#. Playwright aims to address the challenges faced by testers and developers when automating tests for complex web applications. Playwright training is important for mastering end-to-end testing of web applications.

img
request

Can’t find a batch you were looking for?

 

Playwright is an open-source automation testing framework developed by Microsoft that enables reliable end-to-end testing for modern web applications. It provides a developer-friendly API and supports multiple programming languages, including JavaScript, TypeScript, Python, and C#. Playwright aims to address the challenges faced by testers and developers when automating tests for complex web applications. Playwright training is important for mastering end-to-end testing of web applications.

 
Course Objectives:
 

In this course, you will learn to:

 
  • Self-waiting APIs. Interactions by playwrights automatically wait for ready elements. This makes reliability better and makes test authoring easier.
  • Timeout-free automation. Playwright receives browser signals such as network requests, page navigations, and page load events to avoid the need for sleep timeouts that lead to sluggishness.
  • Efficient parallelism using browser contexts. Use browser contexts to reuse a single instance of a browser across various parallel, isolated execution environments.
  • Selectors for resilient elements. The Playwright can choose elements using user-facing strings like text content and accessibility labels. These strings are more resilient than selectors closely coupled to the DOM structure.
  • A playwright is an out-of-process automation driver that can automate scenarios containing multiple pages and is not constrained by the scope of in-page JavaScript execution.
  • Strong network control. To stub and mock network requests, the Playwright introduces context-wide network interception.
 

Course content

 

Environment Setup
  • Install Python
  • Install PyCharm IDE
  • Create Project in PyCharm
  • Setup and Configuration. (Robot framework, Browser library)
Python program
  • Working with code comments
  • Strings, Integers and Floats
  • Simple Math operations
  • Variables
  • Variables naming conventions
  • Working with Variables
  • F-strings
  • User Input
  • Data type conversion
  • Booleans and Comparisons
  • Conditional Statements
  • Elif statements
  • Boolean logic
  • Lists
  • Tuples
  • Dictionaries
  • For loops
  • While loops
  • Functions
  • Functions with arguments
  • Return from function
  • Function annotations
  • Intro to classes
  • Class examples
  • Modules
  • Packages
  • Standard Python Library
Playwright Basics
  • Why Playwright?
  • Introduction to Playwright section
  • Install git
  • Create a new repo and clone to PyCharm
  • Install Playwright and beta-browsers
  • Record and play a first test with Playwright
  • Test structure(AAA or Given/When/Then)
  • Tests are too fast? – Use slow_mo!
  • Editing default timeout
Playwright Selectors
  • Playwright inspector in Browser Dev Tools
  • Playwright selectors guide
  • Text selectors
  • CSS selectors
  • :nth-match and :has-text
  • Layout selectors
  • XPath selectors
  • Chaining selectors >>
  • Playwright selectors summary
Waits
  • Wait for selector and page loads
  • Build a custom wait
Page Object Model and Project structure
  • Page Object Model
  • Project structure
  • POM helper methods
Pytest Framework 
  • Intro and install pytest
  • Pytest naming conventions
  • Run first pytest test with Playwright
  • Run pytest from PyCharm gutter
  • Run several tests
  • Markers – skip
  • Markers – xfail
  • Custom markers
  • Useful pytest CLI commands
  • Pytest CLI commands documentation
Reporting and Parallel Execution via CLI 
  • Install and run report
  • Parallel run with pytest
  • Combine pytest, reporting and parallel commands
Pytest Playwright fixtures and CLI commands
  • Intro to fixtures
  • py file
  • Create a set_up fixture
  • Page fixture
  • Headed, browsers, slowmo and device emulation CLI commands
  • Capturing screenshots and video recordings
  • base-url CLI command
  • Optimize set_up fixtures
  • Fixture scopes
  • Page fixture vs. browser fixture
  • Add tear_down step
Data Driven Testing
  • Marker – parametrize
  • Data for negative testing
  • Stack parametrize for easier maintenance and better test data coverage
CI/CD integration
  • Set up GitHub Actions
  • Edit yml file and run tests in CI/CD pipeline
  • YML file reference link
  • Use login password via GitHub Secrets
  • Toggle password between local and remote runs
  • Store passwords in .env file
Authentication scenarios
  • Reuse authenticated state with browser context
  • Reuse authenticated state with storage file
  • Importance of page.wait_for_load_state
  • Testing a chat application with multiple users
  • Browser Authentication

 

To see the full course content Download now

Course Prerequisites

 
  • Programming concepts – JavaScript/ TypeScript/Python.
  • Familiarity with web development technologies like HTML, CSS, and DOM manipulation.
  • Basics of testing frameworks – Jest, Mocha.

Who can attend

 
  • Manual testers who want to upgrade themselves to the cutting edge latest automation skills.
  • Selenium/Cypress testers who wants to update their skills with Microsoft version of automation tools.
  • DevOps Engineers

Number of Hours: 30hrs

Certification

  1. Playwright 101 Certification
  2. Playwright 102 Certification

Key features

  • One to One Training
  • Online Training
  • Fastrack & Normal Track
  • Resume Modification
  • Mock Interviews
  • Video Tutorials
  • Materials
  • Real Time Projects
  • Virtual Live Experience
  • Preparing for Certification

FAQs

DASVM Technologies offers 300+ IT training courses with 10+ years of Experienced Expert level Trainers.

  • One to One Training
  • Online Training
  • Fastrack & Normal Track
  • Resume Modification
  • Mock Interviews
  • Video Tutorials
  • Materials
  • Real Time Projects
  • Materials
  • Preparing for Certification

Call now: +91-99003 49889 and know the exciting offers available for you!

We working and coordinating with the companies exclusively to get placed. We have a placement cell focussing on training and placements in Bangalore. Our placement cell help more than 600+ students per year.

Learn from experts active in their field, not out-of-touch trainers. Leading practitioners who bring current best practices and case studies to sessions that fit into your work schedule. We have a pool of experts and trainers are composed with highly skilled and experienced in supporting you in specific tasks and provide professional support. 24x7 Learning support from mentors and a community of like-minded peers to resolve any conceptual doubts. Our trainers has contributed in the growth of our clients as well as professionals.

All of our highly qualified trainers are industry experts with at least 10-12 years of relevant teaching experience. Each of them has gone through a rigorous selection process which includes profile screening, technical evaluation, and a training demo before they are certified to train for us. We also ensure that only those trainers with a high alumni rating continue to train for us.

No worries. DASVM technologies assure that no one misses single lectures topics. We will reschedule the classes as per your convenience within the stipulated course duration with all such possibilities. If required you can even attend that topic with any other batches.

DASVM Technologies provides many suitable modes of training to the students like:

  • Classroom training
  • One to One training
  • Fast track training
  • Live Instructor LED Online training
  • Customized training

Yes, the access to the course material will be available for lifetime once you have enrolled into the course.

You will receive DASVM Technologies recognized course completion certification & we will help you to crack global certification with our training.

Yes, DASVM Technologies provides corporate trainings with Course Customization, Learning Analytics, Cloud Labs, Certifications, Real time Projects with 24x7 Support.

Yes, DASVM Technologies provides group discounts for its training programs. Depending on the group size, we offer discounts as per the terms and conditions.

We accept all major kinds of payment options. Cash, Card (Master, Visa, and Maestro, etc), Wallets, Net Banking, Cheques and etc.

DASVM Technologies has a no refund policy. Fees once paid will not be refunded. If the candidate is not able to attend a training batch, he/she is to reschedule for a future batch. Due Date for Balance should be cleared as per date given. If in case trainer got cancelled or unavailable to provide training DASVM will arrange training sessions with other backup trainer.

Your access to the Support Team is for lifetime and will be available 24/7. The team will help you in resolving queries, during and after the course.

Please Contact our course advisor +91-99003 49889. Or you can share your queries through info@dasvmtechnologies.com

like our courses