Ask coding questions

← Back to all posts
Can I use selenium?
_5 (11)

Is it possible to use selenium? I keep getting errors asking to put driver into the PATH

ShmuelM (9)

The main trick is setting the options correctly
This is how you do it (see comments below for the source):

from selenium import webdriver
from import Options

chrome_options = Options()

driver = webdriver.Chrome(options=chrome_options)

TechTale (0)

@ShmuelM Thanks a lot .First time I launched it did not work second try without modify anything it worked.

LenceOfTheOrder (0)

@ShmuelM Your solution worked on the first try! Thank you so much!

AppleVenturer (0)

Amazing! Had been searching for this for quite some time. @ShmuelM

amasad (3437)

Hey, selenium works now. See the first comment here

much0hackerBOI (3)

@amasad For me its says: 404 NOT_FOUND

much0hackerBOI (3)

for me it says: 404 NOT_FOUND

divyanshupariha (0)

@amasad One of the best thing in repl is for me as am automator

a5rocks (828)

Okay, so you know what the $PATH environment variable is, right? Basically it stores a bunch of folders that your os checks through, for example, to find python.exe, because you ran python. So, your program is like : Hey, we can't find your webdriver (the thing that renders HTML and JS) anywhere! Make sure to add it to your PATH so we can find it

As for if you can use it, you might be able to. Just edit the path environment variable and follow the setup guides.

MP7 (21)

@a5rockshe so the interpreter pulls the file from our computer? I thought has its own database of files/folders/libraries on the server that it imports/uploads from. Not the case?

My attempts to point the interpreter to the webdriver (chrome) I have installed on my computer have been unsuccessful.