Loading…
Loading…
You inherit a 200-test Selenium suite. It fails roughly 40 tests after every front-end release, and every failure turns out to be a locator, not a defect. The team has stopped reading the results.
A representative page object:
1public class CatalogPage {
2 private final WebDriver driver;
3
4 public void search(String term) {
5 driver.findElement(By.xpath("/html/body/div[1]/div/main/section[1]/div[1]/input")).sendKeys(term);
6 driver.findElement(By.cssSelector(".css-8fj20d")).click();
7 Thread.sleep(3000);
8 }
9
10 public String firstProductName() {
11 return driver.findElement(By.xpath("//article[1]/h3")).getText();
12 }
13
14 public void addFirstProductToCart() {
15 driver.findElement(By.xpath("//article[1]//button")).click();
16 }
17}Your task: diagnose every problem you can see, rewrite the page object, and describe how you would roll the fix across 200 tests without stopping feature work. Then answer: "How do you stop this recurring in six months?"
Write your own answer first — the defect report, the case table, the locator, whatever the question asks for. An interviewer grades your reasoning, not your recall.
Practice this live with an AI interviewer
Starts a QA mock interview pre-filled with this problem — you can edit the brief before starting.