Playwright Assertions and Waits MCQ Mock Test (200 Questions)

← All Playwright mock interview topics

Test your knowledge of Assertions, Waits and Screenshots with a timed Playwright MCQ mock test. Each attempt gives you 20 random questions in 20 minutes from a 200-question bank covering web-first and generic assertions, soft assertions, expect.poll and toPass, auto-waiting, load states, waiting for responses and URLs, timeouts, screenshots, videos and visual regression testing with toHaveScreenshot. Submit to see your score, the correct answers and an explanation for every question.

What this mock test covers

The questions follow Module 5 of the free Playwright with TypeScript tutorial. Revise these lessons if a question catches you out:

Sample questions with answers

  • Q. Where does `expect` come from in a Playwright test?
    Answer: import { expect } from '@playwright/test'
    Playwright Test ships its own `expect`, extending Jest-style matchers with web-first assertions.
  • Q. What makes `await expect(locator).toBeVisible()` a web-first assertion?
    Answer: It retries until the condition is met or the timeout expires
    Web-first assertions poll the page, which removes the need for manual waits.
  • Q. What is the default timeout for web-first assertions?
    Answer: 5 seconds
    Assertions retry for 5,000 ms by default. Change it with `expect: { timeout }` in the config.
  • Q. How do you give a single assertion a longer timeout?
    Answer: await expect(locator).toBeVisible({ timeout: 10000 })
    Most web-first assertions accept a `timeout` option.
  • Q. Why must web-first assertions be awaited?
    Answer: They return Promises; without await the test continues before the check finishes and failures can be missed
    A missing await on an assertion is a classic source of tests that pass when they should fail.

Ready for more? Go back to the Playwright mock interview dashboard to track your overall interview readiness across all topics.

Frequently asked questions

How many questions does the Assertions, Waits and Screenshots mock test have?

The question bank has 200 questions. Each test picks 20 at random, favouring questions you have not seen, so about 10 attempts cover the full bank.

What is the pass mark?

You pass a test with 70% or more, which is 14 of 20 questions correct.

Can I retake the test?

Yes. Retake as often as you like. Every retake draws a fresh set of 20 questions and counts toward your 20-exam readiness target.