

Receiving two (2) error messages:
package org.openqa.selenium does not exist
package org.openqa.selenium.chrome does not exist
Here's what my program looks like: MyClass.java
package newPackage;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class MyClass {
public static void main(String[] args) {
System.setProperty("webdriver.chrome.driver",
"/Users/Informatics/Downloads/chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("google.com");
driver.close();
}
}
p.s. I'm using the newest versions of Eclipse, Selenium, Chrome and Java.
If ur using intellijIdea add this in dependencies in build.gradle file
implementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '4.1.1'
I have added as testimplementation group so got error , it should be implementation group to add all jars
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With