На веб-сайте я пытаюсь нажать кнопку «Принять и продолжить», чтобы принять файлы cookie, которые отображаются во всплывающем окне, но не нажимают ...
Это HTML-код:
'<div>'
'<div class="mainContent" aria-hidden="false" style="">'
'<div class="pdynamicbutton">'
'<a class="call" tabindex="1" role="button">Agree and Proceed</a>'
Мой код в Eclipse:
'@When("^I click on agree terms and conditions$")
public void i_click_on_agree_terms_and_conditions() throws Throwable {'
'driver.findElement(By.xpath("//a[@class='call']/span[text()='Agree And
Proceed']")).click();'`
Я также встроил некоторое ожидание загрузки страницы (30 секунд).