Selenium WebDriver Professional Standards & Competencies 4 — Questions and Answers
Question 1: A Selenium automation engineer is asked to estimate effort for automating a new module. Which factor is most important to assess first?
- The color scheme of the module's UI
- The stability and testability of the UI (dynamic IDs, iframes, frequent redesigns) (Correct answer)
- The number of developers who built the module
- Whether the module uses REST or GraphQL APIs
Correct answer: The stability and testability of the UI (dynamic IDs, iframes, frequent redesigns)
UI stability and testability directly impact automation complexity, reliability, and maintenance burden, making them the critical factor in effort estimation.
Question 2: What does the principle of 'test independence' require of each Selenium test?
- Tests must be run in alphabetical order
- Each test must be able to run and pass or fail regardless of whether other tests have run (Correct answer)
- Tests should share login state to avoid repeated authentication
- Each test must use a unique WebDriver version
Correct answer: Each test must be able to run and pass or fail regardless of whether other tests have run
Independent tests can be run in any order or in isolation, making debugging easier and parallel execution safe.
Question 3: A professional QA team uses Selenium for end-to-end tests and JUnit unit tests. Where should most test coverage exist according to the Testing Pyramid?
- Equally distributed across unit, integration, and UI layers
- Primarily at the unit test layer, with fewer integration tests and even fewer UI tests (Correct answer)
- Primarily at the Selenium UI layer since it tests the full stack
- Exclusively at the Selenium layer to simulate real users
Correct answer: Primarily at the unit test layer, with fewer integration tests and even fewer UI tests
The Testing Pyramid prescribes a broad base of fast unit tests, a smaller middle of integration tests, and a narrow top of slow UI/E2E tests for optimal coverage and speed.
Question 4: When a Selenium test suite is integrated into a CI/CD pipeline, what is the professional standard for handling test failures?
- Allow the pipeline to continue so deployments are not blocked by tests
- Fail the pipeline build so broken code cannot be deployed to production (Correct answer)
- Email the test report but proceed with deployment
- Only fail the build if more than 50% of tests fail
Correct answer: Fail the pipeline build so broken code cannot be deployed to production
A CI/CD pipeline that allows deployment despite test failures defeats the purpose of automation as a quality gate.
Question 5: A Selenium professional is asked to automate a CAPTCHA challenge. What is the correct professional stance?
- Use a third-party CAPTCHA-solving API in every test run
- Disable or mock CAPTCHA in the test environment; do not automate real CAPTCHA solving in tests (Correct answer)
- Train an ML model on CAPTCHA images for the test suite
- Use sendKeys to type random characters until one works
Correct answer: Disable or mock CAPTCHA in the test environment; do not automate real CAPTCHA solving in tests
CAPTCHA is designed to block automation; the professional solution is to bypass it in the test environment via configuration, not to subvert it with solving tools.
Question 6: What responsibility does a professional Selenium engineer have regarding test data management?
- Use production data in all tests to ensure realistic scenarios
- Create, use, and clean up test data as part of the test lifecycle to avoid polluting environments (Correct answer)
- Rely on whatever data happens to exist in the database
- Only test with empty databases to avoid data conflicts
Correct answer: Create, use, and clean up test data as part of the test lifecycle to avoid polluting environments
Owning test data creation and cleanup ensures tests are repeatable, isolated, and do not leave garbage in shared environments.
Question 7: A manager asks a Selenium engineer to automate tests for a module that changes UI every sprint. What is the professional recommendation?
- Automate everything immediately regardless of stability
- Defer or limit automation for highly volatile UI; prioritize stable, high-value flows and reassess as the UI stabilizes (Correct answer)
- Ask developers to freeze the UI permanently
- Write tests with no selectors to avoid the problem
Correct answer: Defer or limit automation for highly volatile UI; prioritize stable, high-value flows and reassess as the UI stabilizes
Automating extremely volatile UI creates constant maintenance overhead that may outweigh the value gained; stable, high-risk areas provide better ROI.
A Selenium automation engineer is asked to estimate effort for automating a new module.
Which factor is most important to assess first?