JavalangNoSuchMethodError orgopenqaseleniumsupportuiWebDriverWaituntilLjavautilfunctionFunctionLjavalangObjectgetting error | Selenium Training|Java|WebDriver|TestNG|Frameworks|Videos
10% June Month Discount Avail now

Selenium Training Forum

javalangNoSuchMethodError orgopenqaseleniumsupportuiWebDriverWaituntilLjavautilfunctionFunctionLjavalangObjectgetting error

S
susmita Biswas Post 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)));

D

Instructor

Demo Reply on 16/04/2019

FIND_ELEMENT_TIMEOUT is this an integer type element?