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

Include support for Firefox webdriver #16

Merged
merged 3 commits into from Jul 7, 2018

Conversation

Projects
None yet
5 participants
@nshores
Copy link
Contributor

commented Apr 21, 2018

I've gone ahead and switched the default Selenium webdriver to Firefox, as there appears to be a recent change to the MyUSPS login form that is stopping Chromedriver or PhantomJS from being able to establish a session. The below code switches the default webdriver from PhantomJS to Firefox, implements other changes needed to support that WebDriver, and updates the default selenium version to 3.11 (the latest). This allows the library to work again in Windows and Linux.

Admin Nick Shores and others added some commits Apr 21, 2018

Admin Nick Shores
Update setup.py
Fix typo
@brianjking

This comment has been minimized.

Copy link

commented Apr 27, 2018

@nshores Does this work on a RaspberryPi?

@nshores

This comment has been minimized.

Copy link
Contributor Author

commented Apr 27, 2018

@brianjking Based on some minimal research, it appears that it Selenium supports Firefox on RasberryPI without issues. First example I found -

Using OS: Raspbian based on Debian Stretch (Sep 7, 2017, linux kernel v4.9) Firefox 52.5.0 (sudo apt-get install firefox-esr) geckodriver v0.17.0 for ARM7

https://raspberrypi.stackexchange.com/questions/75409/running-selenium-firefox-geckodriver-on-raspberry-pi-2-model-b

@jcconnell

This comment has been minimized.

Copy link

commented May 21, 2018

@nshores, Do you have a link or some instructions available for how you installed and configured headless Firefox.

@happyleavesaoc, just curious, any reason this hasn't been merged?

@@ -142,6 +145,8 @@ def _get_driver(driver_type):
"""Get webdriver."""
if driver_type == 'phantomjs':
return webdriver.PhantomJS(service_log_path=os.path.devnull)
if driver_type == 'firefox':

This comment has been minimized.

Copy link
@tchellomello

tchellomello May 26, 2018

Consider using elif instead of if

@nshores

This comment has been minimized.

Copy link
Contributor Author

commented May 31, 2018

@jcconnell - You should reference my docker image to get an idea of how it's built. The dockerfile shows each step of the install process --

https://hub.docker.com/r/nshores/my_usps_notifications/~/dockerfile/

@jcconnell

This comment has been minimized.

Copy link

commented May 31, 2018

@nshores Thanks. Any reason why both Chrome and Firefox are installed? Will I need both?

@nshores

This comment has been minimized.

Copy link
Contributor Author

commented May 31, 2018

@jcconnell Nope, I just haven't removed the chrome support yet due to laziness. You'll just want GeckoDriver and Firefox

@happyleavesaoc happyleavesaoc merged commit 34f704e into happyleavesaoc:master Jul 7, 2018

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.