Automation tester interview questions
Automation tester interview questions and answers
Automation interviews check Selenium (or Playwright) skills, framework design and how you keep tests reliable. These are the questions asked most, with what each one checks.
What to revise before the interview
- Selenium WebDriver architecture
- Locators: ID, CSS, XPath
- Implicit, explicit and fluent waits
- Page Object Model
- TestNG/JUnit: annotations, data providers, parallel runs
- Framework design: data-driven, keyword-driven, hybrid
- API automation with Rest Assured or similar
- Running tests in CI (Jenkins, GitHub Actions)
1.Implicit vs explicit wait?
- What they're checking
- The most common Selenium question.
- How to answer
- Implicit wait sets a global time to find elements; explicit wait waits for a specific condition (element clickable, visible) on a specific element. Prefer explicit waits and don't mix both.
2.Which locator do you prefer, and why?
- What they're checking
- Writing stable tests.
- How to answer
- ID first when unique and stable, then CSS selectors; XPath when you need to navigate by text or relationships. Avoid long absolute XPaths that break with small UI changes.
3.What is the Page Object Model?
- What they're checking
- Framework design basics.
- How to answer
- Each page is a class holding its locators and actions; tests call those methods. When the UI changes, you update one class instead of many tests.
4.How do you handle flaky tests?
- What they're checking
- Real-world experience.
- How to answer
- Find the cause: timing (use proper waits), test data shared between tests, environment issues or order dependence. Fix the cause; retries only hide problems.
5.How do you handle a dropdown, an alert and a new window in Selenium?
- What they're checking
- Hands-on WebDriver knowledge.
- How to answer
- Select class for dropdowns, switchTo().alert() for alerts, and getWindowHandles() with switchTo().window() for new windows or tabs.
6.Explain your automation framework.
- What they're checking
- Asked in almost every experienced interview.
- How to answer
- Language and tools, folder structure, page objects, test data source, reporting (Extent or Allure), configuration for environments, and how it runs in CI.
- Example answer
- “Our framework uses Java, Selenium and TestNG with the Page Object Model. Test data comes from JSON files, environments are switched by a config property, Allure produces reports, and Jenkins runs the regression suite every night and on each release branch.”
7.How do you run tests in parallel?
- What they're checking
- Speeding up suites.
- How to answer
- TestNG parallel settings or a grid (Selenium Grid or a cloud provider), with thread-safe drivers (ThreadLocal) and independent test data.
8.What would you automate, and what would you leave manual?
- What they're checking
- Judgement, not just tools.
- How to answer
- Automate stable, repetitive, high-value flows - login, checkout, regression. Keep exploratory, one-off and rapidly changing UI tests manual.
9.How do you test APIs in your framework?
- What they're checking
- Broader automation skills.
- How to answer
- Rest Assured or similar to send requests and assert status, body and schema; set up test data through APIs to make UI tests faster.
10.Selenium vs Playwright?
- What they're checking
- Awareness of newer tools.
- How to answer
- Selenium is mature and supports many languages and browsers. Playwright has auto-waiting, built-in tracing and fast parallel runs, which reduces flakiness. Either is fine if you know its trade-offs.
Frequently asked questions
Which language is best for Selenium interviews?
Java is the most common in Indian job listings, followed by Python. Choose the one used by the jobs you're applying for.
Do automation interviews include coding questions?
Yes - usually simple programs such as string reversal, counting characters or working with collections, plus writing locators and small scripts.
How do I move from manual to automation testing?
Learn one programming language, then Selenium or Playwright, build a small framework for a demo site, put it on GitHub and run it in CI.
Company interview guides for this role
- Cognizant interview questions
- Capgemini interview questions
- Accenture interview questions
- HCLTech interview questions
- Thoughtworks interview questions
Related roles and topics
- Software tester (manual testing) interview questions
- Java developer interview questions
- Python developer interview questions
- DevOps engineer interview questions
- HR interview questions
- Behavioural interview questions
- Coding interview questions
- System design interview questions
- Interview questions for freshers
- Sales interview questions
- All roles →
Practise these questions for your next interview
Add your resume to Cuelyte AI, type a question and get a clear answer in your own words - in English, Hindi or Hinglish. Free to start.