Monday, September 3, 2018

java: cannot access java.util.function.Function class file for java.util.function.Function not found - Selenium on JAVA with InteliJ

I have below two lines on my selenium code.

WebDriverWait wait = new WebDriverWait(driver, 100);
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(DashObj.HeaderText));

When i execute the test method as on the tittle im getting an error saying 
"java.util.function.Function class file for 
java.util.function.Function not found"

Fix:
Go to File ->Project Structure

There will be an window with some configurations.
Go to Modules and locate the Language level at Sources tab,


By default it was set to 7 , So click on the drop down and set it to 8.


No comments:

Post a Comment