Authentication and Network MCQ Mock Test for Playwright Python (200 Questions)

← All Playwright Python mock interview topics

Test your knowledge of Authentication and Network Control with a timed Playwright Python MCQ mock test. Each attempt gives you 20 random questions in 20 minutes from a 200-question bank covering saving and reusing login state with storage_state, cookies and local storage, per-role sessions, API login, HTTP credentials and MFA strategies, network interception with route, fulfill, continue_, abort, fallback and fetch, waiting for requests and responses, monitoring network and page errors, and recording and replaying traffic with HAR files. Submit to see your score, the correct answers and an explanation for every question.

Advertisement

What this mock test covers

The questions follow Module 8 of the free Playwright with Python & Pytest tutorial. The Python lessons for this module are on the way; until then, revise with these related tutorials:

Advertisement

Sample questions with answers

  • Q. Why reuse a saved login state instead of logging in through the UI in every test?
    Answer: It saves time and removes a common source of flaky steps
    Log in once, then start each test already signed in.
  • Q. Which call saves cookies and local storage of a context to a file?
    Answer: context.storage_state(path='auth.json')
    The file is JSON you can load into new contexts.
  • Q. Which option loads a saved login into a new context?
    Answer: new_context(storage_state='auth.json')
    The context starts with those cookies and storage.
  • Q. What does a storage state file contain by default?
    Answer: Cookies and localStorage for each origin
    sessionStorage is not saved; IndexedDB needs indexed_db=True.
  • Q. Which parameter of context.storage_state() also saves IndexedDB data in Playwright 1.64?
    Answer: indexed_db=True
    Introspection listed path, indexed_db, opfs and credentials.

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

Advertisement

Frequently asked questions

How many questions does the Authentication and Network Control 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.