NoSuchMethodError: org.openqa.selenium.support.ui.WebDriverWait.untilJAVA

Программисты JAVA общаются здесь
Ответить
Anonymous
 NoSuchMethodError: org.openqa.selenium.support.ui.WebDriverWait.until

Сообщение Anonymous »

Я пытаюсь запустить приведенный ниже код селена:

WebDriver driver;
System.setProperty("webdriver.chrome.driver", "C:\\Driver\\chromedriver.exe");
driver = new ChromeDriver();
driver.get("http://www.behsad.com/nportal/Default.aspx?tabid=55");

driver.findElement(By.id("dnn_dnnUser_enhancedRegisterLink")).click();

WebDriverWait wait=new WebDriverWait(driver, 30);
WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(
By.id("dnn_dnnUser_enhancedRegisterLink")));
element.click();


вот мой pom.xml:


info.cukes
cucumber-picocontainer
1.2.5



org.seleniumhq.selenium
selenium-java
3.4.0



и в конце импорт кода:

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;


код застревает в строке:

WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(
By.id("dnn_dnnUser_enhancedRegisterLink")));


и он жалуется:

java.lang.NoSuchMethodError: org.openqa.selenium.support.ui.WebDriverWait.until(Lcom/google/common/base/Function;)Ljava/lang/Object;


Подробнее здесь: https://stackoverflow.com/questions/440 ... wait-until
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «JAVA»