UI Automation with Playwright
This page explains how a test finds an element and waits for it, walks you through a first test on a demo app, and shows how a tester keeps a growing suite readable and easy to debug.
8 min read8 মিনিটে পড়া যায় · 7 sections7টি সেকশন · 12 sources12টি সোর্স · updated Nov 2026আপডেট: Nov 2026
Playwright waits, then clicksPlaywright অপেক্ষা করে, তারপর ক্লিক করে
Watch a click wait for a button to become ready, and an assertion retry up to 5 seconds.দেখুন একটা ক্লিক বাটন তৈরি হওয়া পর্যন্ত অপেক্ষা করে, আর একটা assertion ৫ সেকেন্ড পর্যন্ত আবার চেষ্টা করে।
You’ll learnআপনি শিখবেন
- Why a locator must match one elementকেন locator-এ একটাই element মিলতে হবে
- Which six checks a click waits forclick কোন ছয়টা চেকের জন্য অপেক্ষা করে
- What fires the clickকখন click হয়
- How an assertion retries for 5 secondsassertion কীভাবে ৫ সেকেন্ড আবার চেষ্টা করে
What it is
Playwright Test is an end-to-end test framework for web apps. It bundles a test runner, assertions, isolation, parallel runs, and tools Source 1সোর্স 1. It runs tests on Chromium, WebKit, and Firefox, on Windows, Linux, and macOS. It runs locally or in CI, headless or headed Source 1সোর্স 1.
A test does two things: it performs actions, and it checks the state against expectations Source 2সোর্স 2. Playwright waits for the actionability checks to pass before each action, so you do not add manual waits Source 2সোর্স 2.
Each test runs in its own browser context: a clean, incognito-like profile Source 10সোর্স 10. It has its own local storage, session storage, and cookies Source 10সোর্স 10. So the pages of two tests are isolated from each other Source 2সোর্স 2.
This page covers the test runner itself. For Playwright with Claude Code, see Browser Testing with Playwright.
সহজ English
Playwright Test is a tool that tests a web app from end to end. It comes with what a test needs: a test runner, checks, separate test runs, many tests at once, and tools Source 1সোর্স 1. It works with the Chromium, WebKit, and Firefox browsers, on Windows, Linux, and macOS. It works on your computer or in CI, with the browser window shown or hidden Source 1সোর্স 1.
A test does something on the page, then checks the result Source 2সোর্স 2. Playwright waits for each element before it acts, so you do not add waits Source 2সোর্স 2.
Each test gets a clean browser profile, like a private window Source 10সোর্স 10. It has its own storage and cookies Source 10সোর্স 10. So two tests never share a page Source 2সোর্স 2.
This page is about the test runner. For Playwright with Claude Code, see Browser Testing with Playwright.
বাংলা ব্যাখ্যা
Playwright Test হলো web app-এর end-to-end টেস্টের একটা framework। এর ভেতরেই আছে test runner, assertion, isolation, একসাথে অনেক টেস্ট চালানো আর দরকারি টুল Source 1সোর্স 1। এটা Chromium, WebKit আর Firefox-এ চলে, Windows, Linux আর macOS-এ। নিজের কম্পিউটারে বা CI-তে, browser দেখিয়ে (headed) বা না দেখিয়ে (headless), দুইভাবেই চালানো যায় Source 1সোর্স 1।
একটা টেস্ট দুটো কাজ করে: পেজে action করে, তারপর অবস্থাটা প্রত্যাশার সাথে মিলিয়ে দেখে Source 2সোর্স 2। প্রতিটা action-এর আগে Playwright নিজেই অপেক্ষা করে, তাই আপনাকে হাতে wait লিখতে হয় না Source 2সোর্স 2।
প্রতিটা টেস্ট নিজের আলাদা browser context-এ চলে: incognito-র মতো একটা পরিষ্কার profile Source 10সোর্স 10। এর local storage, session storage আর cookie আলাদা Source 10সোর্স 10। তাই দুটো টেস্টের পেজ একে অপরের থেকে আলাদা থাকে Source 2সোর্স 2।
এই পেজে শুধু test runner-এর কথা। Claude Code-এর সাথে Playwright-এর জন্য Browser Testing with Playwright পেজটা দেখুন।
How it works
Four ideas carry most tests.
- Locators find elements. A locator is a way to find elements on the page at any moment Source 3সোর্স 3. The recommended built-in locators include
page.getByRole(),page.getByText(),page.getByLabel(),page.getByPlaceholder(), andpage.getByTestId()Source 3সোর্স 3. By default,getByTestId()finds an element by itsdata-testidattribute Source 3সোর্স 3. Playwright recommends user-facing attributes, such as the role, first Source 3সোর্স 3. - Locators are strict. An action on a locator throws an error if more than one element matches Source 3সোর্স 3.
- Actions wait. Before an action, Playwright runs actionability checks Source 4সোর্স 4. For
locator.click(), the locator must resolve to exactly one element. The element must be visible, stable (not animating), not covered by other elements, enabled, and not inert Source 4সোর্স 4. If the checks do not pass in time, the action fails with aTimeoutErrorSource 4সোর্স 4. - Assertions retry. An auto-retrying assertion such as
await expect(locator).toBeVisible()retries until it passes or its timeout is reached Source 5সোর্স 5. The best practices call them web-first assertions Source 9সোর্স 9. The default assertion timeout is 5 seconds Source 5সোর্স 5.
page.getByRole('button', { name: 'Save' }) a locator: how to find the button
│
▼
await locator.click() waits: one element, visible, stable,
│ not covered, enabled, not inert
▼
await expect(message).toBeVisible() retries until true, or fails after 5 sসহজ English
Four ideas do most of the work.
- Locators find elements. A locator tells Playwright how to find something on the page Source 3সোর্স 3. The recommended built-in ones include
page.getByRole(),page.getByText(),page.getByLabel(),page.getByPlaceholder(), andpage.getByTestId()Source 3সোর্স 3. By default,page.getByTestId()uses thedata-testidattribute Source 3সোর্স 3. Playwright says to use what the user sees first, such as the role Source 3সোর্স 3. - Locators are strict. If a locator finds more than one element, the action stops with an error Source 3সোর্স 3.
- Actions wait. Before a click, Playwright checks that there is exactly one element. It must be visible, not moving, not covered, enabled, and not inert (not blocked from user input) Source 4সোর্স 4. If that does not happen in time, the click fails with a
TimeoutErrorSource 4সোর্স 4. - Checks try again.
await expect(locator).toBeVisible()keeps checking until it passes or time runs out Source 5সোর্স 5. The default time is 5 seconds Source 5সোর্স 5.
বাংলা ব্যাখ্যা
বেশিরভাগ টেস্ট চারটা ধারণার ওপর চলে।
- Locator element খুঁজে দেয়। Locator হলো পেজে যেকোনো মুহূর্তে element খোঁজার একটা উপায় Source 3সোর্স 3। প্রস্তাবিত built-in locator-এর মধ্যে আছে
page.getByRole(),page.getByText(),page.getByLabel(),page.getByPlaceholder()আরpage.getByTestId()Source 3সোর্স 3।page.getByTestId()element খোঁজে তারdata-testidattribute দিয়ে Source 3সোর্স 3। Playwright আগে ব্যবহারকারী যা দেখেন সেটা দিয়ে খুঁজতে বলে, যেমন role Source 3সোর্স 3। - Locator কড়া (strict)। একটা locator একাধিক element পেলে action একটা error দিয়ে থেমে যায় Source 3সোর্স 3।
- Action অপেক্ষা করে। Click-এর আগে Playwright দেখে যে element ঠিক একটা কি না। Element-কে দৃশ্যমান, স্থির (animation চলছে না), অন্য কিছুর নিচে ঢাকা নয়, enabled আর inert নয় হতে হবে Source 4সোর্স 4। সময়ের মধ্যে এগুলো না মিললে click একটা
TimeoutErrorদিয়ে fail করে Source 4সোর্স 4। - Assertion বারবার চেষ্টা করে।
await expect(locator).toBeVisible()পাস না করা বা সময় শেষ না হওয়া পর্যন্ত বারবার চেক করে Source 5সোর্স 5। ডিফল্ট সময় ৫ সেকেন্ড Source 5সোর্স 5।
Try it
You need Node.js: the latest 22.x, 24.x, or 26.x Source 1সোর্স 1.
- Create a project. Make a new folder, and run
npm init playwright@latestin it. The command creates a new project, or adds Playwright to an existing one Source 1সোর্স 1. It asks for TypeScript or JavaScript; the default is TypeScript Source 1সোর্স 1. It createsplaywright.config.tsand a first test,tests/example.spec.tsSource 1সোর্স 1. The config holds the browsers, timeouts, retries, projects, and reporters Source 1সোর্স 1. - Run the example. By default,
npx playwright testruns the tests headless, in parallel, on Chromium, Firefox, and WebKit Source 1সোর্স 1. Add--headedto see the browser, or--uito open UI Mode Source 1সোর্স 1.npx playwright show-reportopens the HTML report Source 1সোর্স 1. - Record your steps.
npx playwright codegen demo.playwright.dev/todomvcopens a browser and the Playwright Inspector Source 7সোর্স 7. Click and type in the demo app, and Playwright writes the code for your actions Source 7সোর্স 7. - Write a test. Save this as
tests/todo.spec.tsand runnpx playwright test. It uses built-in locators Source 3সোর্স 3 and auto-retrying assertions Source 5সোর্স 5.
import { test, expect } from '@playwright/test';
test('a new todo shows in the list', async ({ page }) => {
await page.goto('https://demo.playwright.dev/todomvc');
const newTodo = page.getByPlaceholder('What needs to be done?');
await newTodo.fill('Buy milk');
await newTodo.press('Enter');
await expect(page.getByTestId('todo-title')).toHaveText(['Buy milk']);
await expect(page.getByText('1 item left')).toBeVisible();
});- Debug it.
npx playwright test --debugopens a browser and the Playwright Inspector Source 11সোর্স 11. Its step over button steps through the test Source 11সোর্স 11. UI Mode lets you explore, run, and debug tests, with time travel and a watch mode Source 12সোর্স 12.
সহজ English
You need Node.js: the latest 22.x, 24.x, or 26.x Source 1সোর্স 1.
- Make a project. Make a new folder, and run
npm init playwright@latestin it Source 1সোর্স 1. It asks for TypeScript or JavaScript; TypeScript is the default Source 1সোর্স 1. You getplaywright.config.tsand a first test,tests/example.spec.tsSource 1সোর্স 1. - Run it. By default,
npx playwright testruns the tests on three browsers at once, with no window Source 1সোর্স 1. Add--headedto watch, or--uifor UI Mode.npx playwright show-reportopens the report Source 1সোর্স 1. - Record your clicks.
npx playwright codegen demo.playwright.dev/todomvcopens a browser and the Inspector. Use the demo app, and Playwright writes the code for you Source 7সোর্স 7. - Write a test. Save this as
tests/todo.spec.tsand runnpx playwright test. It uses built-in locators Source 3সোর্স 3 and auto-retrying assertions Source 5সোর্স 5.
import { test, expect } from '@playwright/test';
test('a new todo shows in the list', async ({ page }) => {
await page.goto('https://demo.playwright.dev/todomvc');
const newTodo = page.getByPlaceholder('What needs to be done?');
await newTodo.fill('Buy milk');
await newTodo.press('Enter');
await expect(page.getByTestId('todo-title')).toHaveText(['Buy milk']);
await expect(page.getByText('1 item left')).toBeVisible();
});- Find a problem.
npx playwright test --debugopens the browser and the Inspector. You can go through the test one step at a time Source 11সোর্স 11. UI Mode lets you explore, run, and debug tests, go back in time, and use a watch mode Source 12সোর্স 12.
বাংলা ব্যাখ্যা
আপনার Node.js লাগবে: সর্বশেষ 22.x, 24.x বা 26.x Source 1সোর্স 1।
- একটা project বানান। একটা নতুন folder বানিয়ে তাতে
npm init playwright@latestচালান Source 1সোর্স 1। এটা জানতে চায় TypeScript না JavaScript; ডিফল্ট হলো TypeScript Source 1সোর্স 1। আপনি পাবেনplaywright.config.tsআর প্রথম টেস্টtests/example.spec.tsSource 1সোর্স 1। - চালিয়ে দেখুন। ডিফল্টভাবে
npx playwright testতিনটা browser-এ একসাথে, window ছাড়া (headless) টেস্ট চালায় Source 1সোর্স 1। দেখতে চাইলে--headedযোগ করুন, আর UI Mode-এর জন্য--ui। রিপোর্ট খুলতেnpx playwright show-reportSource 1সোর্স 1। - আপনার ক্লিক রেকর্ড করুন।
npx playwright codegen demo.playwright.dev/todomvcএকটা browser আর Playwright Inspector খোলে। Demo app-এ ক্লিক আর টাইপ করুন, Playwright নিজেই কোড লিখে দেবে Source 7সোর্স 7। - একটা টেস্ট লিখুন। নিচের কোডটা
tests/todo.spec.tsনামে সেভ করেnpx playwright testচালান। এতে আছে built-in locator Source 3সোর্স 3 আর নিজে থেকে retry করা assertion Source 5সোর্স 5।
import { test, expect } from '@playwright/test';
test('a new todo shows in the list', async ({ page }) => {
await page.goto('https://demo.playwright.dev/todomvc');
const newTodo = page.getByPlaceholder('What needs to be done?');
await newTodo.fill('Buy milk');
await newTodo.press('Enter');
await expect(page.getByTestId('todo-title')).toHaveText(['Buy milk']);
await expect(page.getByText('1 item left')).toBeVisible();
});- সমস্যা খুঁজুন।
npx playwright test --debugbrowser আর Inspector খোলে, আর আপনি ধাপে ধাপে টেস্টটা চালাতে পারেন Source 11সোর্স 11। UI Mode দিয়ে টেস্ট ঘুরে দেখা, চালানো আর debug করা যায়, সাথে আছে সময়ে পিছিয়ে দেখা (time travel) আর watch mode Source 12সোর্স 12।
How a tester uses it
- Test what the user sees. A test should check that the app works for its end users, and not rely on implementation details Source 9সোর্স 9. Prefer user-facing attributes to XPath or CSS selectors Source 9সোর্স 9. The DOM can easily change, and a test that depends on its structure then fails Source 9সোর্স 9.
- Keep the suite readable with page objects. A page object gives one page a higher-level API and keeps its selectors in one place Source 6সোর্স 6. Playwright's own example builds it as a helper class Source 6সোর্স 6. The test then reads like the steps of a user:
// tests/todo-page.ts
import type { Locator, Page } from '@playwright/test';
export class TodoPage {
readonly page: Page;
readonly newTodo: Locator;
readonly titles: Locator;
constructor(page: Page) {
this.page = page;
this.newTodo = page.getByPlaceholder('What needs to be done?');
this.titles = page.getByTestId('todo-title');
}
async goto() {
await this.page.goto('https://demo.playwright.dev/todomvc');
}
async add(text: string) {
await this.newTodo.fill(text);
await this.newTodo.press('Enter');
}
}// tests/todo-pom.spec.ts
import { test, expect } from '@playwright/test';
import { TodoPage } from './todo-page';
test('two todos keep their order', async ({ page }) => {
const todos = new TodoPage(page);
await todos.goto();
await todos.add('Buy milk');
await todos.add('Pay bills');
await expect(todos.titles).toHaveText(['Buy milk', 'Pay bills']);
});- Share the setup.
test.describedeclares a group of tests.test.beforeEachandtest.afterEachrun before and after each test Source 2সোর্স 2. - Read failures from CI. The default config records a trace on the first retry of a failed test (
on-first-retry) Source 8সোর্স 8. Retries are 2 on CI and 0 locally Source 8সোর্স 8. You open a trace from the trace icon in the HTML report Source 8সোর্স 8. Locally,--trace onforces tracing Source 8সোর্স 8. - Test only what you control. Do not test links to external sites or third-party servers that you do not control Source 9সোর্স 9.
সহজ English
- Test what the user sees. A test should check that the app works for the people who use it, not how the code is built Source 9সোর্স 9. Prefer what a user sees to XPath or CSS selectors Source 9সোর্স 9. The page structure can easily change, and then such a test breaks Source 9সোর্স 9.
- Use page objects. In Playwright's example, a page object is a helper class for one page Source 6সোর্স 6. It gives you simple steps for that page, and keeps the selectors in one place Source 6সোর্স 6.
- Share the setup.
test.describegroups tests.test.beforeEachandtest.afterEachrun before and after each test Source 2সোর্স 2. - Read failures from CI. By default, a trace is recorded when a failed test runs again the first time Source 8সোর্স 8. CI tries a failed test 2 more times; your computer does not retry Source 8সোর্স 8. Open the trace from the HTML report. On your computer,
--trace onturns tracing on Source 8সোর্স 8. - Test only what you control. Do not test links to external sites or third-party servers that you do not control Source 9সোর্স 9.
বাংলা ব্যাখ্যা
- ব্যবহারকারী যা দেখেন, সেটাই টেস্ট করুন। টেস্ট দেখবে app তার ব্যবহারকারীদের জন্য ঠিকমতো কাজ করে কি না; কোড ভেতরে কীভাবে বানানো, সেটার ওপর নির্ভর করবে না Source 9সোর্স 9। XPath বা CSS selector-এর বদলে ব্যবহারকারী যা দেখেন সেটা দিয়ে element খুঁজুন। DOM সহজেই বদলায়, আর তখন DOM-এর গঠনের ওপর নির্ভর করা টেস্ট fail করে Source 9সোর্স 9।
- Page object ব্যবহার করুন। Playwright-এর উদাহরণে page object হলো একটা পেজের জন্য একটা helper class Source 6সোর্স 6। এটা সেই পেজের জন্য সহজ ধাপ দেয়, আর selector-গুলো এক জায়গায় রাখে Source 6সোর্স 6।
- Setup ভাগ করে নিন।
test.describeটেস্টগুলোকে একটা group-এ রাখে।test.beforeEachআরtest.afterEachপ্রতিটা টেস্টের আগে আর পরে চলে Source 2সোর্স 2। - CI-এর fail বুঝুন। ডিফল্ট config-এ fail করা টেস্ট প্রথমবার আবার চলার সময় trace রেকর্ড হয় (
on-first-retry) Source 8সোর্স 8। CI-তে retry ২ বার, আর নিজের কম্পিউটারে ০ বার Source 8সোর্স 8। HTML report থেকে trace খুলুন। নিজের কম্পিউটারে--trace onদিলে trace জোর করে চালু হয় Source 8সোর্স 8। - শুধু নিজের জিনিস টেস্ট করুন। যে বাইরের site-এর link বা third-party server আপনার নিয়ন্ত্রণে নেই, সেগুলো টেস্ট করবেন না Source 9সোর্স 9।
Common mistakes
- A manual assertion.
expect(await page.getByText('welcome').isVisible()).toBe(true)does not wait: it checks once and returns at once Source 9সোর্স 9. Writeawait expect(page.getByText('welcome')).toBeVisible()instead, which waits until the condition is met Source 9সোর্স 9. - A missing
await. Retrying assertions are async, so you must await them Source 5সোর্স 5. - A sleep in the test. Playwright already waits for the actionability checks, so a test needs no manual waits Source 2সোর্স 2.
- CSS classes or XPath as selectors. They tie the test to the DOM structure, which can easily change Source 9সোর্স 9. Use the user-facing locators instead Source 3সোর্স 3.
- A locator that matches many elements. The action throws, because locators are strict Source 3সোর্স 3. Narrow the locator, for example with
locator.filter()Source 3সোর্স 3.locator.first()skips the strictness check, and the docs do not recommend it Source 3সোর্স 3. - Tests that depend on each other. Each test should be completely isolated and run on its own Source 9সোর্স 9.
সহজ English
- A check that does not wait.
expect(await page.getByText('welcome').isVisible()).toBe(true)looks once and moves on Source 9সোর্স 9. Writeawait expect(page.getByText('welcome')).toBeVisible(), which waits Source 9সোর্স 9. - A missing
await. The checks that try again needawaitin front Source 5সোর্স 5. - A sleep in the test. Playwright already waits before each action, so do not add waits Source 2সোর্স 2.
- CSS classes or XPath to find elements. They tie the test to the page structure, which can easily change Source 9সোর্স 9. Use the user-facing locators instead Source 3সোর্স 3.
- A locator that finds many elements. The action fails Source 3সোর্স 3. Make the locator narrower, for example with
locator.filter()Source 3সোর্স 3. The docs do not recommendlocator.first(), which skips the check Source 3সোর্স 3. - Tests that need each other. Each test should work alone Source 9সোর্স 9.
বাংলা ব্যাখ্যা
- হাতে লেখা assertion।
expect(await page.getByText('welcome').isVisible()).toBe(true)অপেক্ষা করে না: একবার দেখে সাথে সাথে ফিরে আসে Source 9সোর্স 9। এর বদলে লিখুনawait expect(page.getByText('welcome')).toBeVisible(), যেটা শর্ত পূরণ না হওয়া পর্যন্ত অপেক্ষা করে Source 9সোর্স 9। awaitবাদ পড়া। যে assertion বারবার চেষ্টা করে, সেগুলো async, তাই এগুলোর আগেawaitদিতেই হবে Source 5সোর্স 5।- টেস্টে sleep রাখা। Playwright নিজেই action-এর আগে অপেক্ষা করে, তাই হাতে wait লাগে না Source 2সোর্স 2।
- CSS class বা XPath দিয়ে element খোঁজা। এগুলো টেস্টকে DOM-এর গঠনের সাথে বেঁধে দেয়, আর DOM সহজেই বদলায় Source 9সোর্স 9। এর বদলে ব্যবহারকারী যা দেখেন সেই locator ব্যবহার করুন Source 3সোর্স 3।
- একাধিক element-এ মেলা locator। Locator strict, তাই action error দেয় Source 3সোর্স 3। Locator সরু করুন, যেমন
locator.filter()দিয়ে Source 3সোর্স 3।locator.first()strictness check এড়িয়ে যায়, আর docs এটা ব্যবহারের পরামর্শ দেয় না Source 3সোর্স 3। - একটা টেস্ট আরেকটার ওপর নির্ভর করা। প্রতিটা টেস্ট পুরো আলাদা থাকবে আর নিজে নিজে চলবে Source 9সোর্স 9।
What a tester can check
Tutorial advice
This list is the tutorial's own advice, not a fact from a source.
- Locators. Do the tests find elements by role, label, text, or test id? Count the CSS classes and XPath selectors that are left.
- Assertions. Does every check of the page start with
await expect(? Search forisVisible()inside anexpect(. - Waits. Search the suite for
waitForTimeout. Each one is a sleep that a web-first assertion can replace. - Isolation. Run one test alone, then the whole suite. A test that passes alone but fails in the suite, or the other way round, shares state with another test.
- CI evidence. Does a failed CI run keep the HTML report and the trace as artifacts?
- Page objects. Does each page object hold only the locators and steps of its own page?
- Scope. Do the tests stop at your app, or do they also test sites that you do not own?
সহজ English
Tutorial advice
This list is the tutorial's own advice, not a fact from a source.
- Locators. Do the tests find elements by role, label, text, or test id? Count the CSS classes and XPath that are left.
- Checks. Does every check start with
await expect(? Look forisVisible()inside anexpect(. - Waits. Look for
waitForTimeout. Each one is a sleep that a waiting check can replace. - Separate tests. Run one test alone, then all of them. A test that passes alone but fails with the others, or the other way round, shares something with another test.
- CI proof. Does a failed CI run keep the report and the trace?
- Page objects. Does each page object hold only its own page?
- Scope. Do the tests stay on your app, or do they also test sites you do not own?
বাংলা ব্যাখ্যা
Tutorial advice
এই তালিকা টিউটোরিয়ালের নিজের পরামর্শ, কোনো source থেকে নেওয়া তথ্য নয়।
- Locator। টেস্টগুলো কি role, label, text বা test id দিয়ে element খোঁজে? কতগুলো CSS class আর XPath selector রয়ে গেছে, গুনে দেখুন।
- Assertion। পেজের প্রতিটা চেক কি
await expect(দিয়ে শুরু হয়?expect(-এর ভেতরেisVisible()খুঁজুন। - Wait। পুরো suite-এ
waitForTimeoutখুঁজুন। প্রতিটা একটা sleep, যার জায়গায় web-first assertion বসানো যায়। - Isolation। একটা টেস্ট একা চালান, তারপর পুরো suite। যে টেস্ট একা পাস করে কিন্তু suite-এ fail করে, বা উল্টোটা, সেটা অন্য কোনো টেস্টের সাথে state ভাগ করছে।
- CI-এর প্রমাণ। CI-তে fail হলে কি HTML report আর trace artifact হিসেবে থেকে যায়?
- Page object। প্রতিটা page object কি শুধু নিজের পেজের locator আর ধাপ রাখে?
- Scope। টেস্টগুলো কি আপনার app-এই থামে, নাকি আপনার নয় এমন site-ও টেস্ট করে?
Key words
| Term | Meaning |
|---|---|
| Playwright Test | An end-to-end test framework for web apps, with its own test runner and assertions. |
| Locator | A way to find elements on the page at any moment, such as page.getByRole(). |
| Strict locator | An action on a locator throws an error if more than one element matches. |
| Actionability checks | The checks before an action: one element, visible, stable, not covered, enabled, and not inert. |
| Web-first assertion | An await expect(...) check that retries until it passes or times out (5 seconds by default). |
| Browser context | The clean, incognito-like profile that each test gets, with its own storage and cookies. |
| Page object | A class that gives one page a higher-level API and keeps its selectors in one place. |
| Codegen | The test generator: it records your actions in a browser as test code. |
| Trace | Recorded on the first retry of a failed test by the default config; you open it from the trace icon in the HTML report. |
| UI Mode | A mode to explore, run, and debug tests, with time travel and a watch mode. |