So I am trying to write a test in which the first step is logging in, but it is denying me access as it detected automation tools because the javascript has not been enabled and there is no profile. So I am trying to load my default profile. The problem I'm getting is that the browser does open, but it quickly fails as I get a SessionNotCreatedException. The failure occurs in the service hooks:

    public void setup() {

        "E:\\interview_notcodegod\\src\\drivers\\chromedriver.exe" );

        ChromeOptions options = new ChromeOptions();


        options.addArguments("--user-data-dir=C:/Users/[username]/AppData/Local/Google/Chrome/User Data");

        driver = new ChromeDriver(options); // intellij points here (nullpointerexception)

Is there a line of code that i'm missing? I've updated my chromedriver already because I thought that was the issue (chrome Version 99.0.4844.74 (Official Build) (64-bit), chromedriver:99.0.4844.51)

error message


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.