Playwright TypeScript Coding Round Playbook
Not 500 programs. The 40 that SDET coding rounds keep coming back to.
Walk into the live coding round with 40 programs you have already solved, in TypeScript.
Not 500 programs. The 40 that SDET coding rounds keep coming back to, from strings and arrays to real Playwright tasks, each with approach, solution and output.
- 46 pages
- 9 parts
- 40 programs
- Buy
- Instant download
- Prepare part by part
Most testers do not fail the coding round on knowledge
They fail on the first five minutes:
- The interviewer bans .reverse() or .sort() and the answer you memorised stops working.
- You know Playwright, but writing a loop, a Map or a Promise from scratch on a shared screen feels new.
- You start typing before you have a plan, and the interviewer watches you rewrite it twice.
- The Playwright task at the end (broken links, sorted columns, API checks) is where the offer is decided, and nobody practised it.
Why 40 and not 500
Long program lists spread your time thin. These 40 are the ones SDET coding rounds keep returning to, each with the approach to say out loud, the full solution and the mistake to avoid. Master these and you have practised the round you are most likely to face.
After this playbook you can
- Say your approach out loud in 4 steps before you type a single line.
- Solve the string, array, object, logic and async programs interviewers repeat most, without built-in shortcuts.
- Write the Playwright UI and API programs that close the round: broken links, sorted tables, totals, new tabs, CRUD through the API.
- Spot the common mistake in each program before the interviewer does.
- Reuse the utility programs (retry with backoff, test data, date helpers, config loader) in your own framework on day one.
Look inside
The first 3 pages of 46, exactly as you get them. Swipe, then tap a page to enlarge it.
Buy to unlock all 46 pages
Full table of contents
All 9 parts and 40 programs, exactly as they appear in the PDF. Tap a part to see its programs.
Part 1. String Programs6 programs
- Your interviewer bans .reverse(). Write a function that reverses a string with a plain loop.
- A form field must accept palindromes like "A man, a plan, a canal: Panama". Write the check that ignores case, spaces and punctuation.
- Build a character frequency report for a test string, skipping spaces.
- A log line has repeated characters. Write a function that returns the first character that appears only once.
- Two labels must use exactly the same letters in a different order. Write a function that confirms it.
- A page title must be shown in Title Case. Write a function that converts a messy sentence, even with double spaces.
Part 2. Array Programs5 programs
- An API returned some order ids more than once. Write a function that lists every id that repeats.
- Find the second highest score in a list in a single pass, without sorting it.
- A test matrix lists the same browser twice, and a student list has repeated ids. Remove the repeats but keep the first-seen order.
- Test run ids should go from 1 to n with no gaps, but one is missing. Write a function that finds it.
- Given a list of prices and a coupon value, return the positions of the two prices that add up to it, in one pass.
Part 3. Objects and Maps4 programs
- Write a program to group an array of objects by a property.
- Write a program to find the most frequent words in a paragraph.
- Write a program to check if two objects are deeply equal.
- Write a program to flatten a nested object into dot-separated keys.
Part 4. Logic and Math4 programs
- Write a program to print FizzBuzz from 1 to 15.
- Write a program to print the first n numbers of the Fibonacci series.
- Write a program to print all prime numbers up to n.
- Write a program to reverse a number and find the sum of its digits.
Part 5. Async and Promises4 programs
- Write a program that runs async tasks one after another, then all in parallel, and compare the time.
- Write a function that fails if a Promise takes longer than a given time.
- Write a program that checks several URLs and reports which passed and which failed, without stopping at the first failure.
- Write a program that runs many async tasks but only N at a time.
Part 6. Playwright UI Programs6 programs
- Write a Playwright program to collect all links on a page and find the broken ones.
- Write a Playwright program to verify a table column is sorted after clicking its header.
- Write a Playwright program to count products on a page and calculate the total price.
- Write a Playwright program to handle a link that opens in a new tab.
- Write a Playwright program to read all dropdown options and select one.
- Write a Playwright program to scroll an infinite list until all items are loaded.
Part 7. Playwright API Programs4 programs
- Write a Playwright program that creates, reads, updates and deletes a record through the API.
- Write a Playwright program to compare data shown in the UI with the data from the API.
- Write a Playwright program to check the structure and types of an API response.
- Write a Playwright program to log in through the API once and reuse the token in later calls.
Part 8. Utility Programs for Frameworks4 programs
- Write a retry helper that retries an async function with a growing delay.
- Write a program to generate unique random test data (email, phone, name).
- Write date helper functions: format a date as DD-MM-YYYY and add days to a date.
- Write a program to read test data from a JSON file and filter the cases to run.
Part 9. Framework Patterns3 programs
- Write a custom fixture that gives every test a logged-in dashboard page object.
- Write a typed config loader that reads environment variables with safe defaults.
- Write a test data builder using the builder pattern.
A real page from the playbook
Write a Playwright program to verify a table column is sorted after clicking its header.
- Click the column header.
- Read every cell of that column with allTextContents.
- Convert the texts to numbers if needed.
- Compare with a sorted copy of the same list.
await page.getByRole('columnheader', { name: 'Price' }).click();
const cells = page.locator('table tbody tr td:nth-child(3)');
const prices = (await cells.allTextContents())
.map(t => Number(t.replace(/[^0-9.]/g, '')));
const sorted = [...prices].sort((a, b) => a - b);
expect(prices).toEqual(sorted);Remember: Copy before sorting ([...prices]) so you compare against the original order.
Common mistake: Calling prices.sort() directly. It sorts the original array, so the check always passes.
Who it is for
This is for you if
- Manual or junior automation testers moving into SDET roles where the interview has a live coding round.
- Automation engineers who use Playwright daily but freeze when asked to write plain TypeScript logic.
- Anyone with an interview in the next few weeks who needs practice, not theory.
It is not for you if
- You want data structures and algorithms for product company developer roles. This is tuned for SDET and automation rounds.
- You want a video course. This is a reading and practice playbook.
What is inside
- Real output under every TypeScript programEvery pure TypeScript program was run and its real output is printed. Playwright programs are marked as example output.
- Try it yourselfExtra exercises at the end of every part, without solutions.
PDF, 46 pages. Works on phone and laptop.

From Jatin
Jatin Shharma
12+ years in test automation at Infosys, HERE Maps (originally Nokia Maps) and B2X. Client work for BMW and Audi, including self-parking car automation.
More about JatinQuestions
Why only 40 programs?
Long question banks spread your time thin. These are the 40 programs SDET interviews keep coming back to, each answered properly, so you prepare what you are most likely to be asked instead of skimming hundreds.
Who is it for?
Testers preparing for the live coding round in SDET and automation interviews, in TypeScript.
Do I need to know Playwright first?
Parts 1 to 5 are pure TypeScript. Parts 6 to 9 use Playwright, so basic Playwright helps there.
What format is it?
A PDF you can read on your phone or laptop and print if you like. The download link comes to your email and stays in My purchases.
Do I get updates?
Yes. Everyone who has it gets every update, and fresh links always download the newest version.
Is this generic content I can find online?
No. Every answer is written for the way SDET interviews are run: the points to say, the code to show, and the mistake that loses marks.
Are the outputs real?
Yes. Every pure TypeScript program was run and its real output is printed under the code. Playwright programs need a live site, so their output is marked as an example.
Practise the round before the round
40 programs, each with the approach to say out loud, the full solution and the mistake to avoid.
Also in a bundle
Playwright TypeScript Interview Bundle
The Coding Round Playbook and the Last-Minute Notes together. Rs 698 if bought separately.
SDET Interview Complete Bundle
All five paid playbooks and notes: Playwright TypeScript, Playwright JavaScript and Selenium Python. Rs 1,895 if bought separately.