When I load a webpage, the text I need appears with a delay. First, there are three points instead, after some time the text itself appears.
Waiting via WebDriver wait does not work.
What you see immediately when the page loads:
Al. post office: ...
What is loaded a little later and, in fact, I need:
Al. Email: tram-param@gde-to.tut
private final WebDriverWait wait = new WebDriverWait(DriverSingleton.getDriver(), 10); private final WebElement companyEmail = wait.until( ExpectedConditions.visibilityOfElementLocated(By.xpath("//li[contains(text(),'Эл. почта:')]")));
Through Assert I check the received text (email) with a regular expression. The test, of course, feilitsya, because I do not get a valid email.
Tell me how to wait for the item to load.