JavalangNoSuchMethodError orgopenqaseleniumsupportuiWebDriverWaituntilLjavautilfunctionFunctionLjavalangObjectgetting error | Selenium Forum
S
susmita Biswas Posted on 14/04/2019

Hi Team,

I am using maven 3.6.1,eclipse 2018-09,jdk 1.8_201,selenium webdriver 2.141.59.

 

I am doing a POM code where I have a Basepage.java class and i have the below method.but while running using testng i am getting error.

 

Attaching my POM.XML file.Please suggest something to solve

 

;java.lang.NoSuchMethodError: org.openqa.selenium.support.ui.WebDriverWait.until(Ljava/util/function/Function;)Ljava/lang/Object;getting error

 

public WebElement findElement(String elementId, String locType)
{
WebElement element = null;

try
{
if(locType.equalsIgnoreCase("id")){
return new WebDriverWait(driver, FIND_ELEMENT_TIMEOUT).until(ExpectedConditions
.visibilityOfElementLocated(By.id(elementId)));


A
Ashish Thakur Replied on 16/04/2019

FIND_ELEMENT_TIMEOUT is this an integer type element?