Test-Driven Coder
Test-Driven Coder

Reputation: 31

I got an error after running my first Selenium test in Eclipse

Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for E:\i_Chile_Okeno Profile\i_Software Tester\Softwarez\Selenium Installations\new jars\selenium-server-standalone-3.9.1.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class org.apache.bsf.BSFManager not in module

I created another Java project, and when building the path, this time I chose Classpath and not Modulepath. I copypasted the code ?(changed the class name to Day2) and still got the following error message:

Exception in thread "main" java.lang.Error: Unresolved compilation problem: at seleniumtest2/net.serenestudy.selenium.webdriver.basic.Day2.main(Day2.java:30)
package net.serenestudy.selenium.webdriver.basic;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class Day2 {

    WebDriver driver;

    public void invokeBrowser() {


            try {
                System.setProperty("webdriver.chrome.driver","E:\\i_Chile_Okeno Profile\\i_Software Tester\\Softwarez\\Selenium Installations\\new jars\\chromedriver_win32.exe");
                driver = new ChromeDriver();
                driver.manage().deleteAllCookies();
                driver.manage().window().maximize();
                driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
                driver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);

                driver.get("http://serenestudy.net");
            } catch (Exception e) {
                e.printStackTrace();
            }

            }

    public static void main(String[] args) {
        Day2 myObj = new Day2();
        myObj.invokeBrowser();

    }

}

Upvotes: 0

Views: 600

Answers (1)

Vishvas Pandya
Vishvas Pandya

Reputation: 53

This error is probably because you are trying a space between folder name so it causes the problem. Try the same without a space!

Upvotes: 2

Related Questions