Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 99025

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

$
0
0

i am trying to run the below selenium code :

        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();

here is my pom.xml:

<dependency><groupId>info.cukes</groupId><artifactId>cucumber-picocontainer</artifactId><version>1.2.5</version></dependency><dependency><groupId>org.seleniumhq.selenium</groupId><artifactId>selenium-java</artifactId><version>3.4.0</version></dependency>

and at the end there is the imports of the code:

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;

the code gets stuck in the line:

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

and it complains with:

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

Viewing all articles
Browse latest Browse all 99025

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>