Home > Enterprise >  Seeing this error on my intellij and I am also having issue importing WebDriverWait and dependecies
Seeing this error on my intellij and I am also having issue importing WebDriverWait and dependecies

Time:11-30

This is for WebDriverWait issue

enter image description here

I am unable to import it despite the dependeny in my pom file.

This is for the error I am seeing my Intellij. it is like there is an issue with maven repo

enter image description here

package atda;

import org.openqa.selenium.WebDriver;

public class LoginPage {
    private final WebDriver driver;

    public LoginPage(WebDriver driver) {
        this.driver = driver();
    }

    public void open() {
        driver.get("suacedemo.com");
    }

    public boolean isLoaded() {
        WebDriverWait
    }
}

I was hoping to be able to add WebDriverWait from Maven dependencies but it is not available despite the dependency has been added to POM

CodePudding user response:

Assuming you want the IDE to automatically import WebDriverWait you will need to complete the line of code. For example:

WebDriverWait wait = new WebDriverWait(driver,Duration.ofSeconds(30));

If not then WebDriverWait can be imported from:

import org.openqa.selenium.support.ui.WebDriverWait;

In addition, ensure that you have copied your selenium dependency from here.

CodePudding user response:

Here are the screenshots as I could not add them in the comments. I have attached them in their order according to the explanation in the comment. I would appreciate it if I could be assisted. [This is the screenshot of the WebDriverWait in the code1

This shows the error message

This shows where it says No results when I tried to add Maven Dependeny

This shows error in the remote repositories

Thank you for your help!

  • Related