The type org.openqa.selenium.chrome.ChromeDriver is not accessible

落花浮王杯 提交于 2019-12-25 18:44:10

问题


I am getting the error like "The type org.openqa.selenium.chrome.ChromeDriver is not accessible" for almost all the classes I am using in Selenium.

It was working fine till I was using Java 8 but when I upgraded to Java 10 I am getting errors like this.

See the screenshot of the project below:

Edit 1:

Selenium-server jar file also contains all the webdriver code as well. See the below image. It has the ChromeDriver class in the same package which I have imported in the above class. The same combination is working fine If I am using either Java 8 (again see the below screenshot)or an older version of eclipse say neon.


回答1:


To avoid such error, You should change java compiler to early version 1.7 or 1.7 from configuring build path.




回答2:


Download selenium Client and Webdriver jar form the below link:

https://www.seleniumhq.org/download/




回答3:


try this link to understand some setting to work with Java 10 before you use it. Hope this helps : https://www.youtube.com/watch?v=_JNeiGbAgL4&list=PL9ooVrP1hQOFP9H8Y15DVGCA6GavhgJ8a&index=2




回答4:


I faced same issue today with eclipse photon. In the process of fixing the issue, i removed selenium standalone jar and issue was resolved. I could see you added selenium standalone jar to your project. Remove that and try again. Hope that works.




回答5:


Delete the latest version of selenium.server.standalone.jar and instal and add to build path any previous version. It worked for me



来源:https://stackoverflow.com/questions/52245708/the-type-org-openqa-selenium-chrome-chromedriver-is-not-accessible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!