My selenium test suite always has a few tests failing intermittently on each run on the firefox browser. On the next run the same tests will pass and new tests will fail. It is usually times out after 3 minutes of webdriverwait looking for an element. I also increase the wait time after clicks with thread.sleep. Any advice on how to fix it?
This is the intermittently failing line.
WebElement listing = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Check the Listings")));
listing.click();
Thread.sleep(5000);
Thanks.