Skip to content

Allow a comma-separated list of Chrome extensions to use #341

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

Merged
merged 3 commits into from
Jul 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion help_docs/customizing_test_runs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ In addition to [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/m
* Choose whether to enter Debug Mode on failures
* Choose additional variables to pass into tests
* Choose the User-Agent for the browser to use
* Change the automation speed (with Demo Mode)
* Choose the automation speed (with Demo Mode)
* Choose whether to run tests multi-threaded
* Choose whether to retry failing tests
* Choose a Chrome User Data Directory to use
* Choose a Chrome Extension to load
* Choose a BrowserStack server to run on
* Choose a Sauce Labs server to run on
* Choose a TestingBot server to run on
Expand Down
3 changes: 3 additions & 0 deletions help_docs/features_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
* Can run tests through a proxy server. (Use ``--proxy=IP_ADDRESS:PORT``)
* Can use an authenticated proxy server. (``--proxy=USERNAME:PASSWORD@IP_ADDRESS:PORT``)
* Can change the web browser's user agent string. (Use ``--agent=USER_AGENT_STRING``)
* Can set a Chrome User Data Directory / Profile to load. (Use ``--user_data_dir=DIR``)
* Can load Chrome Extension ZIP files (comma-separated). (Use ``--extension_zip=ZIP``)
* Can load Chrome Extension folders (comma-separated). (Use ``--extension_dir=DIR``)
* Can handle Google Authenticator logins by using the [Python one-time password library](https://pyotp.readthedocs.io/en/latest/).
* Includes a hybrid-automation solution called **[MasterQA](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/masterqa/ReadMe.md)** to speed up manual testing.
* Integrates with [MySQL](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/core/testcase_manager.py), [Selenium Grid](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/utilities/selenium_grid), [Azure](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/azure/jenkins/ReadMe.md), [Google Cloud](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/google_cloud/ReadMe.md), [Amazon S3](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/plugins/s3_logging_plugin.py), and [Docker](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/docker/ReadMe.md).
Expand Down
7 changes: 5 additions & 2 deletions seleniumbase/core/browser_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,12 @@ def _set_chrome_options(
abs_path = os.path.abspath(user_data_dir)
chrome_options.add_argument("user-data-dir=%s" % abs_path)
if extension_zip:
abs_path = os.path.abspath(extension_zip)
chrome_options.add_extension(abs_path)
extension_zip_list = extension_zip.split(',')
for extension_zip_item in extension_zip_list:
abs_path = os.path.abspath(extension_zip_item)
chrome_options.add_extension(abs_path)
if extension_dir:
# load-extension input can be a comma-separated list
abs_path = os.path.abspath(extension_dir)
chrome_options.add_argument("--load-extension=%s" % abs_path)
chrome_options.add_argument("--test-type")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

setup(
name='seleniumbase',
version='1.25.0',
version='1.25.1',
description='Reliable Browser Automation & Testing Framework',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down