1. Role Expectations – Selenium Tester with 2 Years Experience
At 2 years of experience, interviewers expect you to be a hands-on automation tester, not a fresher who only knows Selenium commands.
What companies expect at this level:
- Strong manual testing fundamentals
- Solid hands-on experience with Selenium WebDriver
- Ability to write, execute, debug, and maintain scripts
- Understanding of automation frameworks
- Working knowledge of STLC & SDLC
- Automation execution in Agile sprints
- Ability to analyze automation failures & RCA
- Exposure to API, SQL, performance basics
- Collaboration with developers & CI pipelines
- Logging automation-related defects effectively
2. Core Selenium & Automation Interview Questions (Technical Round)
1. What is Selenium?
Selenium is an open-source tool used to automate web applications across different browsers and platforms.
2. Why is Selenium widely used?
- Open source
- Supports multiple browsers
- Supports multiple languages (Java, Python, etc.)
- Integrates with TestNG, Maven, CI/CD tools
- Large community support
3. Explain Selenium components
| Component | Purpose |
| Selenium WebDriver | Browser automation |
| Selenium Grid | Parallel execution |
| Selenium IDE | Record & playback |
4. What is WebDriver?
WebDriver interacts directly with browser elements using native browser APIs, allowing faster and reliable automation.
5. Explain SDLC and Selenium tester involvement
| SDLC Phase | Automation Role |
| Requirement | Identify automation scope |
| Design | Framework & tool selection |
| Development | Script creation |
| Testing | Automated execution |
| Deployment | Smoke automation |
| Maintenance | Script updates |
6. Explain STLC in automation projects
- Requirement analysis – identify automatable flows
- Test planning – framework, tools
- Test case design – automation-friendly cases
- Environment setup
- Execution – regression/smoke
- Closure – reports & metrics
7. What types of testing do you automate?
- Smoke testing
- Regression testing
- Sanity testing
- Functional testing
- API automation (basic)
8. What test cases should not be automated?
- One-time test cases
- Exploratory testing
- Highly unstable UI
- CAPTCHA, OTP flows (unless mocked)
9. What are locators in Selenium?
| Locator | Example |
| ID | id=”loginBtn” |
| Name | name=”username” |
| ClassName | class=”btn” |
| XPath | //input[@type=’text’] |
| CSS Selector | input#login |
10. XPath vs CSS Selector
| XPath | CSS |
| Can traverse DOM both ways | Faster |
| Supports text() | Cleaner syntax |
| Slower | Preferred when possible |
11. What is Page Object Model (POM)?
POM separates page elements and test logic, improving:
- Reusability
- Maintainability
- Readability
12. What automation framework have you worked on?
Hybrid framework combining:
- POM
- Data-driven approach
- TestNG
- Maven
- Reporting (Extent)
13. What is TestNG and why is it used?
TestNG provides:
- Annotations
- Parallel execution
- Grouping
- Reporting
- Dependency management
14. How do you handle waits in Selenium?
- Implicit Wait
- Explicit Wait
- Fluent Wait
15. Implicit vs Explicit Wait
| Implicit | Explicit |
| Global | Condition-based |
| Applies to all elements | Specific elements |
16. How do you handle dynamic elements?
- Relative XPath
- Explicit waits
- CSS selectors
- JavaScript Executor
17. How do you handle alerts, frames, and windows?
- switchTo().alert()
- switchTo().frame()
- getWindowHandles()
18. What causes flaky automation tests?
- Sync issues
- Dynamic elements
- Environment instability
- Hard-coded waits
19. How do you debug a failed Selenium script?
- Analyze logs
- Re-run script
- Check locator stability
- Validate environment & data
- Capture screenshots
20. What is Selenium Grid and why is it used?
Grid allows parallel execution across multiple browsers and environments.
3. Agile & Process Interview Questions
21. How does automation fit into Agile?
- Automation runs every sprint
- Regression after every build
- Smoke automation in CI
- Early defect detection
22. What is your role in sprint planning?
- Identify automation scope
- Estimate effort
- Highlight automation risks
23. How do you decide what to automate in a sprint?
- Business-critical flows
- Stable features
- Repetitive regression cases
24. How do you maintain scripts with frequent UI changes?
- Use POM
- Minimize XPath dependency
- Regular refactoring
4. Scenario-Based Interview Questions with RCA
25. Automation scripts pass locally but fail in CI. Why?
- Browser version mismatch
- Timing issues
- Environment config issues
RCA:
Explicit waits missing in CI execution.
26. Automation fails but manual test passes. What do you do?
- Validate locator
- Check test data
- Analyze synchronization
- Share logs/screenshots
27. Login automation fails intermittently. RCA?
Root Cause:
Dynamic token not correlated correctly.
28. Real-Time Automation Defect Example
Issue: Checkout automation fails randomly
Severity: Medium
RCA: Page loads asynchronously, missing wait
5. Real-Time Project Defects & RCA
Banking Web Application
- Defect: Automation fails during fund transfer
- RCA: Dynamic transaction ID not handled
E-commerce Application
- Defect: Cart page script timeout
- RCA: Heavy AJAX calls without sync handling
6. Test Case & Script Examples
UI Automation Test Case – Login
| Step | Action |
| 1 | Open browser |
| 2 | Enter username |
| 3 | Enter password |
| 4 | Click Login |
Expected: Dashboard displayed
Selenium Code Example
driver.findElement(By.id(“username”)).sendKeys(“user1”);
driver.findElement(By.id(“password”)).sendKeys(“pass123”);
driver.findElement(By.id(“loginBtn”)).click();
API Test Case – Login
Using Postman:
POST /login
{
“username”:”user1″,
“password”:”pass123″
}
Database Validation (SQL)
SELECT status
FROM users
WHERE username = ‘user1’;
Performance Awareness Example
Using JMeter:
- Smoke load on login API
- 50 concurrent users
7. Tools Knowledge (2 Years Selenium Tester)
JIRA
- Bug logging
- Automation failure tickets
TestRail
- Test case mapping
- Execution tracking
Selenium
- Script development
- Debugging & maintenance
SQL
- Data validation
- Test data verification
8. Domain Exposure
Banking
- Login
- Fund transfer
- Security flows
Insurance
- Policy creation
- Premium calculation
E-commerce
- Search
- Cart
- Checkout
9. Common Mistakes at 2 Years Experience
- Focusing only on syntax
- Poor framework explanation
- Ignoring manual testing basics
- Weak RCA for failures
- No real project examples
10. Quick Revision Cheat Sheet
- Selenium architecture
- Locators & waits
- POM & framework design
- Agile automation flow
- Debugging techniques
- RCA basics
11. FAQs
Is Selenium enough for automation roles?
For web automation, yes—but API & framework knowledge adds strong value.
Do I need CI/CD knowledge?
Basic understanding of Jenkins/Git is sufficient at this level.
