Код: Выделить всё
[url=https://testwebsite.com/corporate/careers/jobs]Search all jobs[/url]
Код: Выделить всё
@And("the user clicks on Search all jobs")
public void the_user_clicks_on() {
WebDriverWait longWait = new WebDriverWait(driver, Duration.ofSeconds(20)); // Increase the wait time
WebElement submenuElement = longWait.until(ExpectedConditions.elementToBeClickable(
By.xpath("//a[contains(@class, 'score-button') and contains(@href, 'corporate/careers/jobs') and contains(text(), 'Search all jobs')]")));
submenuElement.click();
}
Код: Выделить всё
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for element to be clickable: By.xpath: //a[contains(@class, 'score-button') and contains(@href, 'corporate/careers/jobs') and contains(text(), 'Search all jobs')] (tried for 20 second(s) with 500 milliseconds interval)
Я так понимаю? имеете дело со скрытой кнопкой или что?
Каков наилучший и самый простой способ просто нажать эту кнопку?
Подробнее здесь: https://stackoverflow.com/questions/783 ... g-selenium