Flexible and Dynamic Test Fixtures in Playwright

Why fixtures?

Fixtures in Playwright

JSON Fixtures

import {test as baseTest} from '@playwright/test'
import pageContent from './content/pageContent.json'
type pageData = {
pageContentData: typeof pageContent;
}
const fixture = baseTest.extend<pageData>({
pageContentData: pageContent
})
export const test = fixture;

Object Fixtures

--

--

--

Hi! I am Haris, I am a professional Software Tester with expertise in Test Automation. I like travelling, photography, painting and meeting new people.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

An Introduction to Sets in JavaScript

JavaScript Local Storage Vs Session Storage Vs Cookies (Part I)

Starting off the year with some linting on VSCode (2021)

Angular to Electron in just a few steps

What is Just In Time Compilation (JIT)?

Steps to install React without using npx

content here with bolded text and stuff.

How to Transform a Frontend Project Into a Chrome Extension

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Haris Saleem

Haris Saleem

Hi! I am Haris, I am a professional Software Tester with expertise in Test Automation. I like travelling, photography, painting and meeting new people.

More from Medium

Why Developing Tests Is Needed?

Functional Testing Types-2

The Relationship of Behavior with Test Automation- BDD and Gauge(Part 2)

Running Spring boot cucumber project with maven