0% found this document useful (0 votes)
2 views11 pages

Complete Playwright Python Interview Guide

Uploaded by

m.mailtorajesh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views11 pages

Complete Playwright Python Interview Guide

Uploaded by

m.mailtorajesh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Complete Playwright + Python Automation

Interview Guide
Comprehensive preparation guide for 3–8 years Automation Test Engineer roles.
Python Basics
Q1. What is Python?
Answer: Python is a high-level, interpreted programming language known for readability and
automation support.

Q2. Difference between List and Tuple


Answer: Lists are mutable, tuples are immutable.

Q3. What are *args and **kwargs?


Answer: Used to pass variable-length arguments.

Q4. What is a Lambda Function?


Answer: Anonymous one-line function.
Python OOPs
Q1. What is Encapsulation?
Answer: Wrapping data and methods together inside a class.

Q2. What is Inheritance?


Answer: Child class inherits properties of parent class.

Q3. What is Polymorphism?


Answer: Same method behaves differently based on object.

Q4. What is Abstraction?


Answer: Hiding implementation details from users.
Playwright Fundamentals
Q1. What is Playwright?
Answer: Microsoft's end-to-end automation framework.

Q2. Browser vs Context vs Page


Answer: Browser=application, Context=session, Page=tab.

Q3. What are Locators?


Answer: Reliable mechanism to identify web elements.

Q4. What is Auto-Waiting?


Answer: Playwright automatically waits for elements to be actionable.
Pytest
Q1. What are Fixtures?
Answer: Reusable setup and teardown methods.

Q2. What is Parametrization?


Answer: Run same test with multiple datasets.

Q3. How to skip tests?


Answer: @[Link]

Q4. How to run specific tests?


Answer: pytest -k test_name
Framework Design
Q1. What is POM?
Answer: Page Object Model separates page actions from tests.

Q2. Why use Utility Classes?


Answer: To avoid duplicate code.

Q3. How to structure framework?


Answer: Pages, Tests, Utilities, Data, Reports, Config.

Q4. How to capture screenshots on failure?


Answer: Use pytest hooks and [Link]().
API Testing
Q1. What is API Testing?
Answer: Validation of backend services.

Q2. HTTP Methods?


Answer: GET, POST, PUT, PATCH, DELETE.

Q3. Status Codes?


Answer: 200, 201, 400, 401, 404, 500.

Q4. Mock API Response?


Answer: Using [Link]() and [Link]().
SQL
Q1. Difference between WHERE and HAVING?
Answer: WHERE filters rows, HAVING filters grouped data.

Q2. What is JOIN?


Answer: Combines data from multiple tables.

Q3. Types of JOIN?


Answer: INNER, LEFT, RIGHT, FULL.

Q4. What is Subquery?


Answer: Query inside another query.
Git & CI/CD
Q1. What is Git?
Answer: Version control system.

Q2. Git Commands?


Answer: clone, pull, push, commit, merge.

Q3. What is Jenkins?


Answer: Automation server for CI/CD.

Q4. How to run Playwright in Jenkins?


Answer: Execute pytest/playwright commands through Jenkins pipelines.
Scenario Based Questions
Q1. How would you automate OTP login?
Answer: Use test environment APIs, database retrieval, or mocks.

Q2. How would you test dynamic tables?


Answer: Create dynamic locators and iterate rows.

Q3. How would you handle flaky tests?


Answer: Improve locators, waits, test isolation.

Q4. How would you validate downloaded files?


Answer: Verify file existence and content.
Interview Preparation Checklist
• Python OOPs and Exception Handling
• Playwright Locators and Auto-Waits
• Frames, Tabs, Alerts, Windows
• API Mocking and Network Interception
• Pytest Fixtures and Parametrization
• Page Object Model Framework Design
• SQL Queries and Joins
• Git Commands
• Jenkins CI/CD Integration
• Scenario-Based Automation Questions

You might also like