diff --git a/examples/test_download_files.py b/examples/test_download_files.py index 941db7ac900..f10f1e47947 100644 --- a/examples/test_download_files.py +++ b/examples/test_download_files.py @@ -52,9 +52,9 @@ def test_download_files_from_pypi(self): self.download_file(whl_href) self.download_file(tar_href) else: - self.click(whl_selector) # Download the "whl" file + self.js_click(whl_selector) # Download the "whl" file self.sleep(0.1) - self.click(tar_selector) # Download the "tar" file + self.js_click(tar_selector) # Download the "tar" file # Verify that the downloaded files appear in the [Downloads Folder] # (This only guarantees that the exact file name is in the folder.) diff --git a/mkdocs_build/requirements.txt b/mkdocs_build/requirements.txt index 84e6a2ac333..e82d61fc56c 100644 --- a/mkdocs_build/requirements.txt +++ b/mkdocs_build/requirements.txt @@ -2,7 +2,7 @@ # Minimum Python version: 3.8 (for generating docs only) regex>=2024.9.11 -pymdown-extensions>=10.10.2 +pymdown-extensions>=10.11.2 pipdeptree>=2.23.4 python-dateutil>=2.8.2 Markdown==3.7 @@ -11,7 +11,7 @@ MarkupSafe==2.1.5 Jinja2==3.1.4 click==8.1.7 ghp-import==2.1.0 -watchdog==5.0.2 +watchdog==5.0.3 cairocffi==1.7.1 pathspec==0.12.1 Babel==2.16.0 @@ -20,7 +20,7 @@ lxml==5.3.0 pyquery==2.0.1 readtime==3.0.0 mkdocs==1.6.1 -mkdocs-material==9.5.38 +mkdocs-material==9.5.39 mkdocs-exclude-search==0.6.6 mkdocs-simple-hooks==0.1.5 mkdocs-material-extensions==1.3.1 diff --git a/requirements.txt b/requirements.txt index d4040dab303..d61302714bc 100755 --- a/requirements.txt +++ b/requirements.txt @@ -55,7 +55,7 @@ pyotp==2.9.0 python-xlib==0.33;platform_system=="Linux" markdown-it-py==3.0.0 mdurl==0.1.2 -rich==13.8.1 +rich==13.9.1 # --- Testing Requirements --- # # ("pip install -r requirements.txt" also installs this, but "pip install -e ." won't.) diff --git a/seleniumbase/__version__.py b/seleniumbase/__version__.py index 272d8c5cf86..f6c1da56ad8 100755 --- a/seleniumbase/__version__.py +++ b/seleniumbase/__version__.py @@ -1,2 +1,2 @@ # seleniumbase package -__version__ = "4.31.2" +__version__ = "4.31.3" diff --git a/seleniumbase/core/browser_launcher.py b/seleniumbase/core/browser_launcher.py index d444b42a17d..01cba62c226 100644 --- a/seleniumbase/core/browser_launcher.py +++ b/seleniumbase/core/browser_launcher.py @@ -2024,6 +2024,7 @@ def _set_firefox_options( disable_csp, firefox_arg, firefox_pref, + external_pdf, ): blank_p = "about:blank" options = webdriver.FirefoxOptions() @@ -2035,7 +2036,6 @@ def _set_firefox_options( options.set_preference("browser.newtab.url", blank_p) options.set_preference("trailhead.firstrun.branches", "nofirstrun-empty") options.set_preference("browser.aboutwelcome.enabled", False) - options.set_preference("pdfjs.disabled", True) options.set_preference("app.update.auto", False) options.set_preference("app.update.enabled", False) options.set_preference("browser.formfill.enable", False) @@ -2122,13 +2122,20 @@ def _set_firefox_options( options.set_preference( "browser.helperApps.neverAsk.saveToDisk", ( - "application/pdf, application/zip, application/octet-stream, " - "text/csv, text/xml, application/xml, text/plain, " - "text/octet-stream, application/x-gzip, application/x-tar " - "application/" - "vnd.openxmlformats-officedocument.spreadsheetml.sheet" + "application/pdf,application/zip,application/octet-stream," + "text/csv,text/xml,application/xml,text/plain,application/json," + "text/octet-stream,application/x-gzip,application/x-tar," + "application/java-archive,text/x-java-source,java," + "application/javascript,video/jpeg,audio/x-aac,image/svg+xml," + "application/x-font-woff,application/x-7z-compressed," + "application/mp4,video/mp4,audio/mp4,video/x-msvideo," + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ), ) + if external_pdf: + options.set_preference("pdfjs.disabled", True) + else: + options.set_preference("pdfjs.disabled", False) if firefox_arg: # Can be a comma-separated list of Firefox args firefox_arg_list = firefox_arg.split(",") @@ -2768,6 +2775,7 @@ def get_remote_driver( disable_csp, firefox_arg, firefox_pref, + external_pdf, ) capabilities = webdriver.FirefoxOptions().to_capabilities() capabilities["marionette"] = True @@ -3050,6 +3058,7 @@ def get_local_driver( disable_csp, firefox_arg, firefox_pref, + external_pdf, ) if LOCAL_GECKODRIVER and os.path.exists(LOCAL_GECKODRIVER): try: diff --git a/setup.py b/setup.py index 2ddf2005dd7..98577221ae6 100755 --- a/setup.py +++ b/setup.py @@ -204,7 +204,7 @@ 'python-xlib==0.33;platform_system=="Linux"', 'markdown-it-py==3.0.0', 'mdurl==0.1.2', - 'rich==13.8.1', + 'rich==13.9.1', ], extras_require={ # pip install -e .[allure]