1. What is Playwright used for?
- ✅ Browser automation and end-to-end testing
- ❌ Backend performance monitoring
- ❌ Database migration
2. Which company developed Playwright?
- ✅ Microsoft
3. Which command is used to run tests in Playwright?
- ❌ playwright test-run
- ✅ npx playwright test
- ❌ run.playwright
4. What is the default browser engine used by Playwright?
- ❌ Only Chromium
- ✅ Chromium, Firefox, and WebKit
- ❌ Safari only
5. What is the purpose of `page.locator()` in Playwright?
- ✅ To locate elements on a page for interaction
- ❌ To store logs
- ❌ To close the browser
6. How do you take a screenshot in Playwright?
- ❌ capture.image()
- ✅ page.screenshot()
- ❌ browser.snapshot()
7. What is `expect()` used for in Playwright test?
- ❌ To execute shell commands
- ✅ To perform assertions in test scripts
- ❌ To create new browser contexts
8. How do you launch a browser in headless mode?
- ✅ Set headless: true in launch options
- ❌ Use browser.hide()
- ❌ Click minimize button in test
9. What is the use of `context` in Playwright?
- ❌ To save cookies
- ✅ To create isolated browser sessions
- ❌ To send HTTP requests
10. Which file is typically used for Playwright configuration?
- ❌ playwright.settings.js
- ✅ playwright.config.ts or .js
- ❌ test.settings.json