Mô tả

Playwright is a modern, fast and reliable browser automation tool from Microsoft that enables testing and automation across all modern browsers including chromium, firefox and webkit. Pytest is a popular Python testing framework that offers a simple and flexible way to write and run tests. In this course, you will learn how to blend Playwright capabilities into the Pytest framework with the use of pytest-playwright plugin.


This course is designed for beginners in mind! It's alright if you don't anything about web automation! We will cover all the basics of Playwright and Web Automation Essentials, step by step -

  • Different method to locate web elements like role, text, css selectors, xpath, etc.

  • Perform actions on web elements like clicking, filling forms,

  • Events like Auto-waiting, page navigation, downloads, etc.

  • Authentication with your google account


As a bonus, we will develop a script to automatically check for new emails in our inbox and report them back i.e. automated mail checking!


After learning web automation, we will start with testing. Again, it's alright if you're new to automation testing or testing at all! You'll go from writing a basic test to deploying automated tests -


  • Basics of testing with pytest

  • Playwright pytest plugin

  • Playwright Tools like trace viewer, codegen, etc.

  • Web-first assertions using expect( )

  • Solve modern testing problems with UI Testing Playground

  • Playwright fixtures, custom setup/teardown using test hooks, , etc.

  • Implement Page Object Model (POM)

  • Handle network events

  • REST API Testing, authentication and API request context

  • Optimizations techniques like Parallelism

  • Deploy automated tests to CI

  • Parameterize tests with predefined test data

  • Behaviour Driven Development with python behave

  • and more...


By the end of the course, you will be able to write automated tests and perform fast, reliable, and capable testing and automation using Playwright and Pytest.

Bạn sẽ học được gì

Write python scripts to launch browsers and automate tasks performed usually on websites

Locate web elements using various methods like element role, inner text, form label or placeholder, CSS selectors, and XPath

Perform actions on web elements like hover, click, fill form, select option, upload files, and use keyboard shortcuts

Handle events like auto-waiting, custom waiting for an element to load, page navigations, requests, and downloads

Log in to websites and authenticate yourself using your account like Google accounts

Write a script to automate inbox mail checking for new emails and report the same

Use pytest to write and run test cases and define custom pytest fixtures to share test state/data

Utilize playwright tools like taking screenshots, recording videos, trace viewer, and auto code generator

Apply best practices like web-first assertions, Page Object Models (POM), request interceptions and Parallelism

Test API endpoints, define custom API request context, handle API responses, and mock API custom data

Deploy automated tests using Github CI

Practice Behaviour Driven Development (BDD) with playwright and python behave

Yêu cầu

  • Python
  • HTML

Nội dung khoá học

21 sections

Getting Started

5 lectures
Installation
04:57
Playwright Website
01:44
Launch Browser
06:58
Click Link
04:25
Overview
02:05

Locators

12 lectures
Playwright in Python REPL
08:39
Role Locator
08:25
Input Field Locator
03:38
Inner Text Locator
04:05
Alt Text Locator
02:20
Title Locator
01:55
CSS Selectors
10:05
CSS Selectors - Hierarchy
08:09
CSS Selectors - Pseudo Classes
08:58
XPath Locators
06:04
XPath Functions
07:02
Other Locators
10:57

Actions

7 lectures
Mouse Actions
06:53
Fill Input Fields
06:01
Radios, Checkboxes and Switches
05:44
Select Option From Option Menu
03:05
Dropdown Menu
04:23
Upload Files
04:41
Keyboard Shortcuts
03:29

Events

8 lectures
Auto Waiting
07:32
Page Navigation Events
08:46
Custom Waiting
06:09
Event Listeners
08:19
Handling Dialogs
06:02
Download Files
05:20
What Is Sync and Async?
02:46
Async Playwright
06:52

Authentication

3 lectures
Log In With Google Account
08:35
Save Authentication State
08:19
Reuse Authentication State
02:00

Automated Mail Checker

6 lectures
Automatic Mail Checker
00:53
Project Setup
02:06
Locate New Emails
08:43
Locate Email Data
03:55
Combine Locators
06:41
Email Check From Terminal
10:18

pytest

8 lectures
Testing with pytest
01:46
Writing Test
03:53
Running Test
05:12
Type Hinting
04:36
Test State Example
03:45
Create pytest Fixture
02:12
Using Fixture In Test Cases
04:39
Fixture Scope
03:31

pytest-playwright Plugin

5 lectures
Install pytest-playwright plugin
03:01
Writing Test with Playwright
04:31
Running Test
03:15
Pytest Config File
03:14
Test Hook
08:18

Playwright Tools

4 lectures
Take Screenshot
04:09
Record Video
04:43
Trace Generator and Viewer
07:51
Playwright Codegen
04:11

Web-First Assertions

7 lectures
Page Assertions
02:49
Element State Assertions
03:49
Inner Text Assertions
04:04
Attribute Assertions
04:48
Input Field Assertions
05:11
Checkbox Assertions
02:02
Option Menu Assertions
02:50

UI Testing Playground

16 lectures
Dynamic Id
03:15
Class Attribute
03:18
Hidden Layer
05:00
Load Delay
03:21
Ajax Request
02:25
Click Action
02:03
Input Fields
02:33
Scrollbars
03:03
Dynamic Table
09:48
Verify Text
02:03
Progressbar
05:27
Element Visibility
07:17
App Login
05:29
Mouse Hover
03:51
Non Breaking Space Character
02:12
Overlapped Elements
04:39

Playwright Fixtures

4 lectures
Function Scope Fixtures
02:26
Session Scope Fixtures
03:34
Browser Selection Markers
03:07
Browser Launch And Context Arguments
05:37

Page Object Model (POM)

5 lectures
What is Page Object Model?
03:48
POM Implementation
02:40
POM Usage
02:19
POM Example
05:34
POM Example Usage
05:47

Network Events

3 lectures
Network Events
03:12
Handle Requests
10:16
Modify Response
04:49

API Testing

5 lectures
Making an API Call
04:33
API Request Context
03:46
API Query String
06:40
CRUD Operations
11:03
Mock API with Custom Data
04:35

Optimization

3 lectures
Intercept Resource Requests
06:51
Disabling Javascript
03:42
Parallelism - Run Tests In Parallel
04:03

Tips and Tricks

4 lectures
pytest CLI Arguments
05:54
Python Debugger
03:54
Device Emulation
04:15
Evaluate Javascript
03:31

Github API

6 lectures
Introduction
00:52
Project Setup
06:02
Github Token
04:06
Authorized API Context
06:37
Writing Test
10:34
Running Test
02:09

Continuous Integration (CI)

5 lectures
Introduction
00:50
Setup Repository
03:39
Writing Test
06:44
Github Action
09:37
Running Automated Tests
05:13

Data Driven Testing

3 lectures
What Is Data Driven Testing?
01:06
Pytest Paramertrize
03:49
Running Test
01:43

Behaviour Driven Development

5 lectures
What Is Behaviour Driven Development?
01:40
Project Setup
01:35
Define Feature
05:18
Implement Steps
10:28
Running Tests with Behave
01:58

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.