Browser automation foundations
Selenium Interview Questions
WebDriver, locators, waits, page objects, Grid and the maintenance patterns behind stable Selenium suites.
40 questions10 easy22 medium8 hard0/40 learned
01What is Selenium and what problems does the suite solve?Easyselenium · webdriver · browser automation02How does Selenium WebDriver work end to end?Mediumarchitecture · webdriver · browser drivers03How does Selenium compare with Playwright?Mediumselenium · playwright · tooling trade-offs04How does the W3C WebDriver protocol work?Hardw3c webdriver · protocol · capabilities05How do you set up a maintainable Selenium project?Easyproject setup · maven · dependencies06What does a first reliable Selenium test look like?Easyfirst test · webdriver · test lifecycle07Which locator strategies does Selenium support and how do you choose?Easylocators · by · selectors08How do CSS selectors work in Selenium and where do they break?Mediumcss selectors · locators · dom09When should you use XPath in Selenium?Mediumxpath · locators · dom traversal10What are Selenium relative locators and when should you use them?Mediumrelative locators · locators · selenium 411How do waits work in Selenium and why are sleeps wrong?Mediumwaits · webdriverwait · synchronization12What happens when you mix implicit and explicit waits?Hardimplicit waits · explicit waits · timeouts13When do you need a FluentWait instead of WebDriverWait?Mediumfluentwait · polling · custom conditions14How do you design a page object model that stays maintainable?Mediumpage object model · design · maintainability15How does PageFactory work and what are its pitfalls?Mediumpagefactory · page objects · annotations16How do you integrate Selenium with TestNG or JUnit?Easytestng · junit · test lifecycle17How should you assert in a Selenium test?Easyassertions · testng · assertj18How do you handle JavaScript alerts, confirms and prompts?Mediumalerts · javascript dialogs · webdriver19How do you interact with elements inside an iframe?Mediumiframes · frames · context switching20How do you handle multiple windows and tabs?Mediumwindows · tabs · window handles21How do you select options in a dropdown?Easyselect · dropdowns · forms22How does the Selenium Actions API work?Mediumactions · mouse · drag and drop23How do you simulate keyboard and mouse input in Selenium?Mediumkeyboard · mouse · input24How do you upload a file in Selenium?Mediumfile upload · sendkeys · remote execution25How do you test file downloads reliably?Harddownloads · chrome options · filesystem26How do you manage cookies in Selenium?Mediumcookies · session · authentication27When should you use JavascriptExecutor in Selenium?Mediumjavascript executor · dom · workarounds28How do you capture screenshots for debugging and reports?Easyscreenshots · debugging · reporting29When should you run Selenium headless?Easyheadless · chrome · ci30How do you design a cross-browser test strategy?Hardcross-browser · capabilities · test matrix31How does Selenium Grid work and how do you use it?Hardgrid · remote webdriver · scaling32How do you make Selenium tests run in parallel safely?Mediumparallel testing · threadlocal · test isolation33Should you retry failed Selenium tests automatically?Mediumretries · flaky tests · testng34How do you diagnose and fix flaky Selenium tests?Hardflaky tests · debugging · stability35How do API tests complement a Selenium suite?Mediumapi testing · restassured · test pyramid36How do you report Selenium test results effectively?Easyreporting · allure · debugging37How do you run Selenium suites reliably in CI?Mediumci · headless · artifacts38How do you run Selenium in Docker and what are the pitfalls?Harddocker · selenium grid · containers39What are the most common Selenium mistakes?Mediumanti-patterns · debugging · maintainability40What does a stable, production-grade Selenium suite look like?Hardbest practices · suite design · maintenance
Reading is step one
Now say it out loud.
Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live Selenium mock interview and get scored feedback on depth, clarity and confidence.