Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Step 7 of selenium-install-instruction [Windows] #47

Merged
merged 6 commits into from Jun 6, 2021

Conversation

Shirkanesi
Copy link
Contributor

Chromedriver can be placed in the same directory as the main.py
Unexperienced users will be more comfortable putting an unknow file somwhere in their downloads-folder instead of System32 or messing with %PATH%

Chromedriver can be placed in the same directory as the main.py
Unexperienced users will be more comfortable putting an unknow file somwhere in their downloads-folder instead of System32 or messing with %PATH%
@alfonsrv
Copy link
Owner

alfonsrv commented Jun 5, 2021

Hey, thanks for your PR.

Are you sure that's true? – E.g. if you execute the script while in %USERPROFILE% directory as such: python .\Downloads\impf-botpy\main.py

@Shirkanesi
Copy link
Contributor Author

Yes. I've just tested it realy quickly by putting the bot-directory into %temp%. When chromedriver.exe is located in the same directory, everything works. Renaming it to xchromedriver.exe lead to
"selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home"

So i'm pretty sure this works.

@alfonsrv
Copy link
Owner

alfonsrv commented Jun 5, 2021

Indeed does – I'm surprised. Seems like the os.chdir in settings.py is doing the trick.

Thanks for the pointer. We'll have to see on how to formulate it; I'm not happy with the way it is right now. As it's geared towards dummies it's best to have a concise Step-by-Step guide.

In the suggested change users are required to leave Selenium Installation unfinished, go over Python Installation and Download Project and to then jump back to the last step of Selenium Installation to move the chromedriver.exe in the desired directory. This is usually not ideal as less tech-savvy users need clear instructions and goals.

Even if we moved Selenium Installation somewhere else in the process, the same issue arises. As people would have to Download Project first, then put the chromedriver.exe in the bot's folder and finally go back to the last steps of Download Project to execute the bot.

@alfonsrv
Copy link
Owner

alfonsrv commented Jun 6, 2021

Maybe like this?

  1. Put the chromedriver.exe from the zip-Archive in the impf-botpy folder after downloading the project (further down) – alternatively you can:
  • put it into C:\Windows straight away or if you're experiencing issues
  • put it somewhere else, but you should make sure the folder is in your %PATH%-variable
  • point the SELENIUM_PATH in settings.py to the path of the chromedriver.exe explicitly

@Shirkanesi
Copy link
Contributor Author

Sounds good to me.

@alfonsrv
Copy link
Owner

alfonsrv commented Jun 6, 2021

Added formatting – merging to main.

Thank you for contributing. BR,
Alfons

@alfonsrv alfonsrv merged commit 02f8a7a into alfonsrv:main Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants