Error occurred during initialization of boot layer java lang module FindException Module Selenium not found

+2 votes
Encounter the error message "Error occurred during initialization of boot layer java.lang.module.FindException: Module Selenium not found" when i click on Run MyFirstJaveProgram button. How can i resolve this issue?
Nov 14, 2019 in Selenium by nguyenton
• 140 points
31,501 views
Thank you mam it works

3 answers to this question.

+2 votes
This might probably be coz while creating your own class you might have also accepted to create a default class as prescribed by your IDE. If that's the case try this: go to PROJECT folder -> src folder -> Default package keep only one class(in which you had written code) and delete another one.
answered Nov 27, 2019 by Sirajul
• 59,090 points
thanks a lot
Hello Md Kashif. Please register at Edureka community and upvote the answer if it has helped you. You also get credits for every contribution(ask a question, answer, comment or even upvote) you make.

Thank you
Thanks a lot.. this really helps
It is still showing the same error... is there any other tip...

Please I need it
Try removing the selenium dependencies from the ModulePath to ClassPath under the Build path in eclipse.

That should work!
0 votes

try this, just edit paths and package name.

package navi;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

public class Avi {
    public static WebDriver driver;
    WebDriverWait wait5s = new WebDriverWait(driver,5); 

    @BeforeClass
    public static void setUpClass() {
        System.setProperty("webdriver.chrome.driver", "C:\\Users\\pburgr\\Desktop\\chromedriver\\chromedriver.exe");
        ChromeOptions options = new ChromeOptions();
        options.addArguments("user-data-dir=C:\\Users\\pburgr\\AppData\\Local\\Google\\Chrome\\User Data");
        driver = new ChromeDriver(options);
        driver.manage().window().maximize();}   
    @Before
    public void setUp() {}
    @After
    public void tearDown() {}
    @AfterClass
    public static void tearDownClass() {driver.close();driver.quit();}
    @Test
    public void avi() throws InterruptedException {
        driver.get("http://www.gcrit.com/build3/admin/");
        wait5s.until(ExpectedConditions.elementToBeClickable(By.name("username"))).sendKeys("admin");
        driver.findElement(By.name("password")).sendKeys("admin@123");
        driver.findElement(By.id("tdb1")).click();

        // wait to resolve the click before checking url
        Thread.sleep(1000);

        String url = driver.getCurrentUrl();

        if (url.equals("http://www.gcrit.com/build3/admin/index.php")){
        System.out.println("Successful"); 
        }
        else {
        System.out.println("Unsuccessful");
        }
    }
}

For further understanding, you can refer to the Selenium Certification.

answered Dec 15, 2020 by Roshni
• 10,480 points
0 votes

Error occurred during initialization of boot layer java.lang.module.FindException: Module javafx.base not found #91. Closed. leelakarthik  I created a library linked to the javafx sdk and added the line --module-path=${PATH_TO_FX} --add-modules=javafx.controls,javafx.fxml to the VM options line. PATH_TO_FX is defined as an environment variable pointing to my javaFX folder.

answered Dec 15, 2020 by Gitika
• 65,930 points

Related Questions In Selenium

–1 vote
1 answer

Selenium XPath error:- Element not found

The reason for Element not found exception ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,520 points
12,246 views
+1 vote
3 answers

java.lang.ClassNotFoundException: okhttp3.ConnectionPool - Selenium Error

The only reason for ClassNotFoundException is if ...READ MORE

answered Mar 30, 2018 in Selenium by nsv999
• 5,520 points
9,151 views
0 votes
1 answer

Java.lang.CharSequence cannot be resolved error while using sendKeys() using Selenium Webdriver

You could try this, myElement .sendKeys(new String[] { ...READ MORE

answered Apr 4, 2018 in Selenium by Johnathon
• 9,090 points
2,311 views
0 votes
1 answer

Firefox Error: “Your connection is not secure” while launching driver with Selenium 3.0.1 using Java

Download Firefox 55 beta and set capabilities.setCapability("acceptInsecureCerts", true); Here ...READ MORE

answered Sep 17, 2018 in Selenium by Meci Matt
• 9,460 points
922 views
0 votes
1 answer

Getting error saying element not found in selenium

Hey @Jino, The things I figured out ...READ MORE

answered Dec 20, 2018 in Selenium by Shuvodip
3,468 views
+3 votes
1 answer

How to read excel file numeric data of all rows and column in selenium? I have 10 rows and 5 column but I read Only String value not a Numeric value?

Hey, @Mahendra, check this thread https://www.edureka.co/community/52170/read-numeric-data-from-excel-sheet-using-selenium-webdriver It deals with ...READ MORE

answered Jan 27, 2020 in Selenium by Sirajul
• 59,090 points
758 views