Unable to find the import statement for WebDriver

124 views
Skip to first unread message

kumar kumar

unread,
Feb 15, 2024, 11:52:01 PM2/15/24
to Selenium Users
I've downloaded all the Selenium jar files for the Webdriver and configured them with Java.But when I'm writing the statement Webdriver driver =new ChromeDriver();,it's not showing the import statement .Can someone please help me on thisError-Screenshot.png

Krishnan Mahadevan

unread,
Feb 15, 2024, 11:59:47 PM2/15/24
to seleniu...@googlegroups.com
Rather than you trying to setup your class path properly on your own for java to work (which is what am guessing you did in this case, but it looks like you haven’t done it properly), I would strongly suggest that you spend sometime trying to get yourself familiar with a build tool such as one of the following: 

4. Buck ( https://buck.build/learning/tutorial.html )

It would be really worth the time and it is going to save you a lot of time apart from ensuring that you become comfortable with build tools which almost all realtime Java projects make use of.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/

On 16-Feb-2024, at 3:02 AM, kumar kumar <kumar...@gmail.com> wrote:

I've downloaded all the Selenium jar files for the Webdriver and configured them with Java.But when I'm writing the statement Webdriver driver =new ChromeDriver();,it's not showing the import statement .Can someone please help me on this<Error-Screenshot.png>

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/9cf51444-bc8c-479c-8029-a3d15ba736d1n%40googlegroups.com.
<Error-Screenshot.png>

Prakash Suryawanshi

unread,
Feb 16, 2024, 2:34:15 AM2/16/24
to seleniu...@googlegroups.com
import correct library for this.

import org.openqa.selenium.WebDriver;

and try agin

On Fri, Feb 16, 2024 at 10:21 AM kumar kumar <kumar...@gmail.com> wrote:
I've downloaded all the Selenium jar files for the Webdriver and configured them with Java.But when I'm writing the statement Webdriver driver =new ChromeDriver();,it's not showing the import statement .Can someone please help me on thisError-Screenshot.png

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/9cf51444-bc8c-479c-8029-a3d15ba736d1n%40googlegroups.com.


--
thanks & regards,


Prakash P Suryawanshi
9545456632
Reply all
Reply to author
Forward
0 new messages