import org.openqa.selenium.* shows compilation error - The package org.openqa.selenium is not accessible even though I have added the external jar files in the class path.

0 votes

Hi, I am a new to selenium. I have installed the latest version of Java, Eclipse and selenium and have set up as suggested in the below blog-

I have also added the external jar files to the class path.

but  import org.openqa.selenium.* shows compilation error  as  The package org.openqa.selenium is not accessible. hence I am unable to do any further progress.

the Java version - is 15

Eclipse IDE for Java Developers - Version: 2020-09 (4.17.0)

Selenium - Java - 3.141.59

Am I missing anything?

Oct 7 in Selenium by anonymous
• 120 points

1 answer to this question.

0 votes

Here's what you can try 

  • Either keep only selenium-server-standalone-3.141.59.jar as an external JAR.
  • Or keep only selenium-java-3.141.59 JARs as an external JARs.
  • Remove all the other Selenium Java Client JARs.
  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
  • Take a System Reboot.
  • Execute your @Test.

Additionally, you need to provide the absolute path of the chromedriver.exe as follows:

answered Oct 7 by Karan
• 19,570 points
thank you it is very useful

Related Questions In Selenium

0 votes
1 answer
0 votes
2 answers
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,520 points
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31 in Selenium by Sri
• 2,970 points
0 votes
2 answers

What is the role of TestNG & JUnit frameworks in Selenium?

TestNG and JUnit are test frameworks . it ...READ MORE

answered Sep 4 in Selenium by Sri
• 2,970 points
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
+1 vote
1 answer

How can I automate the process of adding iPhone to cart in Flipkart using Selenium(java),Page Object Model and TestNG? Also validate if product is added and available in cart?

Hey check this It deals with a similar ...READ MORE

answered Jan 13 in Selenium by Karan
• 19,570 points