Skip to content

MyUstaadG

Learn to Serve

  • Computer Science
    • Software
    • Computer Tips
    • Coding
      • Conditional Structures Exercises
      • Loops Exercises
      • Arrays Exercises
      • Python Exercises
    • Microsoft Office
      • MS Excel
      • MS Word
  • Videos
    • Funny Videos
    • Health and Fitness Videos
    • PUBG Videos
    • Technology Videos
  • News
  • Funny
  • Memes
  • Playwright Tutorials
  • Tutorials
  • Toggle search form

Tag: playwright documentation

Playwright Tutorial for Beginners 9 – Assertions

Posted on February 20, 2022February 20, 2022 By myustaadg.com No Comments on Playwright Tutorial for Beginners 9 – Assertions
Playwright Tutorial for Beginners 9 – Assertions

Playwright Assertions Playwright make use of expect library (provided by Jest) for assertions. The library provides different types of matchers like toEqual, toContain, toMatch, toMatchSnapshots and many more. To make use of the library, import it into your test script. You can extend with async matchers that will wait until the specified assertion condition is met. Common patterns Custom assertions To have custom…

Read More “Playwright Tutorial for Beginners 9 – Assertions” »

Playwright Tutorials

Playwright Tutorial for Beginners 8 – Screenshots

Posted on February 20, 2022February 20, 2022 By myustaadg.com No Comments on Playwright Tutorial for Beginners 8 – Screenshots
Playwright Tutorial for Beginners 8 – Screenshots

To screenshot, make use of page.screenshot({ path: ‘screenshot/screenshot.png’ }) Full page screenshots Full page screenshot is a screenshot of a full scrollable page, as if you had a very tall screen and the page could fit it entirely. Element screenshots You can also take screenshots of elements too: An example Hope You will learn Something. Happy…

Read More “Playwright Tutorial for Beginners 8 – Screenshots” »

Playwright Tutorials

Playwright Tutorial For Beginners 7 – Videos

Posted on February 20, 2022February 20, 2022 By myustaadg.com No Comments on Playwright Tutorial For Beginners 7 – Videos
Playwright Tutorial For Beginners 7 – Videos

Playwright can record videos for all pages in a browser context. A BrowserContext is an isolated incognito-alike session within a browser. Just like when you open an incognito window of your browser, the browser state (cache, cookies etc.) is isolated between test. Using the page provide by Playwright test runner, @playwright/test, the page provided in the tests callback opens in a…

Read More “Playwright Tutorial For Beginners 7 – Videos” »

Playwright Tutorials

Playwright Tutorial for Beginners 6 – Demo 1

Posted on February 20, 2022February 20, 2022 By myustaadg.com No Comments on Playwright Tutorial for Beginners 6 – Demo 1
Playwright Tutorial for Beginners 6 – Demo 1

Introduction: In previous tutorials, we learnt some basic concepts of testing with Playwright. So in this tutorial, we will put some of the concepts into practice by writing a basic test script for an online store. Setting up our tests: installing Playwright via npm install –save-dev @playwright/test. next, setup the configuration file in the root of the…

Read More “Playwright Tutorial for Beginners 6 – Demo 1” »

Playwright Tutorials

Playwright Tutorial for Beginners 5 – Performing Actions

Posted on February 20, 2022February 20, 2022 By myustaadg.com No Comments on Playwright Tutorial for Beginners 5 – Performing Actions
Playwright Tutorial for Beginners 5 – Performing Actions

Test input: You can easily fill-out form fields with page.fill(). page.fill() focuses on the element and triggers an input event with the specified text. It works on <input>, <textarea>, [contenteditable] and <label> associated with an input or text area. To view how the test ran, you can set the headless and slowMo property in the playwright.config.js file. For Instance: page.type() can also be used but it differs to page.fill() in sense of it sending…

Read More “Playwright Tutorial for Beginners 5 – Performing Actions” »

Playwright Tutorials

Playwright Tutorial for Beginners 4 – Selectors and Locators

Posted on February 20, 2022February 20, 2022 By myustaadg.com No Comments on Playwright Tutorial for Beginners 4 – Selectors and Locators
Playwright Tutorial for Beginners 4 – Selectors and Locators

Playwright locators and selectors To interact with elements, you need to locate the element first. Selectors are used when locating an element. Then we can perform actions and write assertions on the elements by means of methods such click(), dbclick(). Ways to select locate an element in Playwright: Text selectors The selector locates element that contains specified…

Read More “Playwright Tutorial for Beginners 4 – Selectors and Locators” »

Playwright Tutorials

Playwright Tutorial for Beginners 3 – Trace Viewer

Posted on February 20, 2022February 20, 2022 By myustaadg.com No Comments on Playwright Tutorial for Beginners 3 – Trace Viewer
Playwright Tutorial for Beginners 3 – Trace Viewer

In this tutorial, we will learn about another GUI tool provided by Playwright called the Trace Viewer. The Playwright Trace Viewer is a GUI tool that helps in exploring recorded Playwright traces after a tests script is executed. Recording a Trace We set the trace configuration in the Playwright configuration file, playwright.config.js. For instance: When you run…

Read More “Playwright Tutorial for Beginners 3 – Trace Viewer” »

Playwright Tutorials

Playwright Tutorial for Beginners 2 – Code Generator

Posted on February 20, 2022February 20, 2022 By myustaadg.com No Comments on Playwright Tutorial for Beginners 2 – Code Generator
Playwright Tutorial for Beginners 2 – Code Generator

Using Playwright test generator (codegen) Playwright has a feature that allows us to generate tests scripts by interacting with web apps directly. Generating a test script We will run the below command in our terminal to open a todo app, then we can perform some basic functions of the website: At the time of writing this…

Read More “Playwright Tutorial for Beginners 2 – Code Generator” »

Playwright Tutorials

Playwright Tutorial for Beginners 1 – Getting Started

Posted on February 20, 2022February 20, 2022 By myustaadg.com No Comments on Playwright Tutorial for Beginners 1 – Getting Started
Playwright Tutorial for Beginners 1 – Getting Started

What is Playwright? From the documentation’s definition, Playwright is a tool that “enables reliable end-to-end testing for modern web apps”. What does end-to-end testing mean? End-to-end testing is, simply, a technique that aims to verify an entire software from beginning to end to make sure that the application flow behaves as expected. Running end-to-end on a typical to-do list webpage would…

Read More “Playwright Tutorial for Beginners 1 – Getting Started” »

Computer Tips, Playwright Tutorials

Copyright © 2022 MyUstaadG.

Powered by PressBook Blog WordPress theme