Can I use selenium?
Is it possible to use selenium? I keep getting errors asking to put driver into the PATH
Hey I know there is a solution to this question, however it doesn't work for some people, including me. I found an answer:
Hey for anyone having problems with the webdriver not being found, here is the solution:
It took a while to find out, what you need to do is create a new repl, and press on the 3 dots and unhide hidden files (it says unhide because i have mine unhidden):
Once you've done this, press on the replit.nix file.
You should see the following code:
Once you've done this, inside the list named 'deps' you add pkgs.chromium & pkgs.chromedriver, as shown:
Once this is done you can run any selenium script inside the repl, hope this helps!
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 selenium.webdriver.chrome.options import Options
chrome_options = Options()
driver = webdriver.Chrome(options=chrome_options)
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.
@a5rockshe so the repl.it interpreter pulls the file from our computer? I thought repl.it 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.