Import org can not be resolved for the statement import org.openqa.selenium.WebDriver;

120 views
Skip to first unread message

Beginner

unread,
Sep 19, 2018, 4:28:55 PM9/19/18
to Selenium Users

I'm trying to create a WebDriver object for Chrome in Eclipse, and was advised to add the following 2 statements in the begging of the script

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.chrome.ChromeDriver;


However, after above 2 statements were added, when hovering mouse on "org"  in each of above 2 statements, there's an error displayed, like: Import org can not be resolved and the statements were marked as wrong


Any one can help me on this where I was stuck?


Thanks!

creating WebDriver.JPG
creating WebDriver 2.JPG
creating WebDriver 3.JPG

Madhumita V

unread,
Oct 4, 2018, 8:46:32 AM10/4/18
to Selenium Users
Hi,

You can add Selenium Standalone Server to your build path

Project -> Right Click -> Build Path -> Configure Build Path -> libraries ->Add External Jar
(here you need to direct to the path of the selenium standalone jar file you have installed) ->Apply and close

Download link:


Hope this helps.

Thank you
Reply all
Reply to author
Forward
0 new messages