Merge pull request #99 from ktp420/firefox_profile

Update selenium version to fix Firefox browser not starting with profile
This commit is contained in:
Michael Mintz 2017-05-01 14:25:42 -04:00 committed by GitHub
commit 31eeaeacef
3 changed files with 8 additions and 6 deletions

View File

@ -1,7 +1,7 @@
pip>=9.0.1 pip>=9.0.1
setuptools>=35.0.1 setuptools>=35.0.1
ipython==5.3.0 ipython==5.3.0
selenium==3.4.0 selenium==3.4.1
nose>=1.3.7 nose>=1.3.7
pytest>=3.0.7 pytest>=3.0.7
pytest-html>=1.14.2 pytest-html>=1.14.2

View File

@ -22,17 +22,19 @@ def get_driver(browser_name):
profile.set_preference( profile.set_preference(
"security.mixed_content.block_active_content", False) "security.mixed_content.block_active_content", False)
profile.set_preference( profile.set_preference(
"browser.download.manager.showAlertOnComplete", True) "browser.download.manager.showAlertOnComplete", False)
profile.set_preference("browser.download.panel.shown", True) profile.set_preference("browser.download.panel.shown", False)
profile.set_preference( profile.set_preference(
"browser.download.animateNotifications", True) "browser.download.animateNotifications", False)
profile.set_preference("browser.download.dir", downloads_path) profile.set_preference("browser.download.dir", downloads_path)
profile.set_preference("browser.download.folderList", 2) profile.set_preference("browser.download.folderList", 2)
profile.set_preference( profile.set_preference(
"browser.helperApps.neverAsk.saveToDisk", "browser.helperApps.neverAsk.saveToDisk",
("application/pdf, application/zip, application/octet-stream, " ("application/pdf, application/zip, application/octet-stream, "
"text/csv, text/xml, application/xml, text/plain, " "text/csv, text/xml, application/xml, text/plain, "
"text/octet-stream")) "text/octet-stream",
"application/"
"vnd.openxmlformats-officedocument.spreadsheetml.sheet"))
firefox_capabilities = DesiredCapabilities.FIREFOX firefox_capabilities = DesiredCapabilities.FIREFOX
try: try:
# Use Geckodriver for Firefox if it's on the PATH # Use Geckodriver for Firefox if it's on the PATH

View File

@ -20,7 +20,7 @@ setup(
'pip>=9.0.1', 'pip>=9.0.1',
'setuptools>=35.0.1', 'setuptools>=35.0.1',
'ipython==5.3.0', 'ipython==5.3.0',
'selenium==3.4.0', 'selenium==3.4.1',
'nose>=1.3.7', 'nose>=1.3.7',
'pytest>=3.0.7', 'pytest>=3.0.7',
'pytest-html>=1.14.2', 'pytest-html>=1.14.2',