Selenium WebDriver Risk Assessment & Management 5 β Questions and Answers
Question 1: When prioritizing which Selenium tests to automate first using risk-based testing, which criterion should drive selection?
- Tests that are fastest to write
- Tests covering high-frequency user workflows with high defect impact if broken (Correct answer)
- Tests that developers find most interesting
- Tests covering the most recently added features only
Correct answer: Tests covering high-frequency user workflows with high defect impact if broken
Risk-based prioritization focuses automation effort on scenarios where failures would most affect users or business outcomes, maximizing the ROI of automation.
Question 2: A Selenium framework stores credentials in plain text within test configuration files committed to version control. What risk category is this?
- Performance risk
- Security risk β credential exposure (Correct answer)
- Compatibility risk
- Maintainability risk
Correct answer: Security risk β credential exposure
Plain text credentials in version control expose sensitive data to anyone with repository access, representing a direct security vulnerability.
Question 3: What risk does using absolute XPath locators (e.g., /html/body/div[2]/form/input[1]) introduce into a Selenium test suite?
- Locators execute slower than CSS selectors
- Any structural HTML change breaks the locator, making tests highly fragile (Correct answer)
- Absolute XPath cannot locate elements in iframes
- The locator fails on non-Chrome browsers
Correct answer: Any structural HTML change breaks the locator, making tests highly fragile
Absolute XPath is tightly coupled to the full DOM tree structure, so any addition or removal of parent elements invalidates the path.
Question 4: Which risk is most associated with automating Selenium tests against a staging environment that differs significantly from production?
- Tests take longer to execute in staging
- Defects present only in production are not caught before release (Correct answer)
- Selenium cannot connect to HTTPS staging URLs
- Test reports cannot be exported from staging
Correct answer: Defects present only in production are not caught before release
Environment parity gaps mean bugs caused by production-specific configurations, data volumes, or integrations are invisible to the automation suite.
Question 5: A team's Selenium tests pass consistently in Chrome but fail intermittently in Firefox. What is the recommended risk response?
- Remove Firefox from the test matrix
- Investigate Firefox-specific timing and rendering differences and add targeted waits or fixes (Correct answer)
- Accept Firefox failures as known issues
- Downgrade Firefox to an older stable version
Correct answer: Investigate Firefox-specific timing and rendering differences and add targeted waits or fixes
Browser-specific failures indicate real compatibility risks that should be investigated and resolved rather than suppressed, since end users use Firefox.
Question 6: Which risk is introduced when a Selenium test suite lacks a teardown phase that restores the application to its pre-test state?
- The WebDriver session remains open indefinitely
- Subsequent tests operate on polluted state, causing order-dependent failures (Correct answer)
- Browser memory usage increases linearly
- Test reports include duplicate entries
Correct answer: Subsequent tests operate on polluted state, causing order-dependent failures
Without teardown, residual data or state from one test can cause the next test to fail or produce misleading results, breaking test independence.
Question 7: In a risk assessment matrix, a Selenium test gap in the checkout flow is rated High Probability + High Impact. What is the correct risk response?
- Accept the risk and monitor
- Immediately prioritize automating the checkout flow to close the coverage gap (Correct answer)
- Transfer the risk to manual testers only
- Reduce the impact rating by adding documentation
Correct answer: Immediately prioritize automating the checkout flow to close the coverage gap
High Probability + High Impact risks demand immediate mitigation; automating the checkout flow closes the coverage gap and reduces both likelihood and impact of undetected defects.
When prioritizing which Selenium tests to automate first using risk-based testing, which criterion should drive selection?