How to give the path to chrome driver?

I’m having problem in giving path to chrome driver.

hey @dishita_jain ,
when we use browser.ChromDriver()
like for example
path = C://users//chromedriver.exe
then it would be
browser.ChromDriver("C://users//chromedriver.exe")

I hope this helped you.

I’m still getting error.

is it the same error ?
or something else ?

Kindly share a screenshot.

hey @dishita_jain ,
it is a path error.
Although i can’t explain you like this , do one thing , place chromedriver.exe file in the same folder in which your code is ( in which you are working in ).
and in path , just provide the name of the file like ,
browser.ChromeDriver('chromedriver.exe')

It will work fine.

Now the error is coming…name ‘browser’ is not defined.

what variable to did you used for the WebBrowser , used that just.

I didn’t used any…can you pls tell me from start what to do.

for an example , have a look at this code.
browser = webdriver.Chrome(executable_path="../../chromedriver.exe") browser.get("https://codechef.com")

here the browser is that variable i am talking about.
if you have not done it like that , then do it like that and complete your task.

1 Like

The browser is opening now. Thank you!!

1 Like

That’s really good.

I guess your doubt is now resolved.
If yess , then i will request you to kindly mark this doubt as resolved in your course doubt section and also do provide your valuable feedback as it helps us to improve our system.
And if there is something left then you can easily raise your another doubt or reopen this too.

Thank You and Happy Learning :slightly_smiling_face:.

1 Like