From dcae21dead25e197ed524afb7e50f2aba8e01e5d Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Mon, 6 Sep 2021 12:58:41 -0400 Subject: [PATCH] Update the docs --- docs/requirements.txt | 2 +- examples/capabilities/ReadMe.md | 6 ++--- help_docs/customizing_test_runs.md | 12 ++++----- help_docs/method_summary.md | 19 +++++++------- .../utilities/selenium_grid/ReadMe.md | 25 ++++++++++--------- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index e8f875f1..a4d709eb 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -21,5 +21,5 @@ mkdocs==1.2.2;python_version>="3.6" mkdocs-material==7.1.3;python_version>="3.6" mkdocs-exclude-search==0.5.2;python_version>="3.6" mkdocs-simple-hooks==0.1.3 -mkdocs-material-extensions==1.0.1;python_version>="3.6" +mkdocs-material-extensions==1.0.3;python_version>="3.6" mkdocs-minify-plugin==0.4.0 diff --git a/examples/capabilities/ReadMe.md b/examples/capabilities/ReadMe.md index ba7416c0..5b5a66c7 100755 --- a/examples/capabilities/ReadMe.md +++ b/examples/capabilities/ReadMe.md @@ -1,15 +1,15 @@ -### Using Desired Capabilities +### Using Desired Capabilities You can specify browser desired capabilities for webdriver when running SeleniumBase tests on a remote SeleniumGrid server such as [BrowserStack](https://www.browserstack.com/automate/capabilities), [Sauce Labs](https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/), or [TestingBot](https://testingbot.com/support/other/test-options). Sample run commands may look like this when run from the [SeleniumBase/examples/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples) folder: (The browser is now specified in the capabilities file.) ```bash -pytest my_first_test.py --browser=remote --server=USERNAME:KEY@hub.browserstack.com --port=80 --cap_file=capabilities/sample_cap_file_BS.py +pytest test_demo_site.py --browser=remote --server=USERNAME:KEY@hub.browserstack.com --port=80 --cap_file=capabilities/sample_cap_file_BS.py ``` ```bash -pytest my_first_test.py --browser=remote --server=USERNAME:KEY@ondemand.saucelabs.com --port=80 --cap_file=capabilities/sample_cap_file_SL.py +pytest test_demo_site.py --browser=remote --server=USERNAME:KEY@ondemand.us-east-1.saucelabs.com --port=443 --protocol=https --cap_file=capabilities/sample_cap_file_SL.py ``` (Parameters: ``--browser=remote``, ``--server=SERVER``, ``--port=PORT``, and ``--cap_file=CAP_FILE.py``) diff --git a/help_docs/customizing_test_runs.md b/help_docs/customizing_test_runs.md index 4391a9f0..ef480bfe 100755 --- a/help_docs/customizing_test_runs.md +++ b/help_docs/customizing_test_runs.md @@ -344,31 +344,31 @@ SeleniumBase lets you run tests on remote Selenium Grids such as [BrowserStack]( Here's how to connect to a BrowserStack Selenium Grid server for running tests: ```bash -pytest my_first_test.py --server=USERNAME:KEY@hub.browserstack.com --port=80 +pytest test_demo_site.py --server=USERNAME:KEY@hub.browserstack.com --port=80 ``` Here's how to connect to a Sauce Labs Selenium Grid server for running tests: ```bash -pytest my_first_test.py --server=USERNAME:KEY@ondemand.saucelabs.com --port=80 +pytest test_demo_site.py --server=USERNAME:KEY@ondemand.us-east-1.saucelabs.com --port=443 --protocol=https ``` Here's how to connect to a TestingBot Selenium Grid server for running tests: ```bash -pytest my_first_test.py --server=USERNAME:KEY@hub.testingbot.com --port=80 +pytest test_demo_site.py --server=USERNAME:KEY@hub.testingbot.com --port=80 ``` Here's how to connect to a CrossBrowserTesting Selenium Grid server for running tests: ```bash -pytest my_first_test.py --server=USERNAME:KEY@hub.crossbrowsertesting.com --port=80 +pytest test_demo_site.py --server=USERNAME:KEY@hub.crossbrowsertesting.com --port=80 ``` Here's how to connect to a LambdaTest Selenium Grid server for running tests: ```bash -pytest my_first_test.py --server=USERNAME:KEY@hub.lambdatest.com --port=80 +pytest test_demo_site.py --server=USERNAME:KEY@hub.lambdatest.com --port=80 ``` Or you can create your own Selenium Grid for test distribution. ([See this ReadMe for details](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md)) @@ -376,7 +376,7 @@ Or you can create your own Selenium Grid for test distribution. ([See this ReadM To use a server on the ``https`` protocol, add ``--protocol=https``: ```bash -pytest test_suite.py --protocol=https --server=IP_ADDRESS --port=PORT +pytest test_demo_site.py --protocol=https --server=IP_ADDRESS --port=PORT ``` -------- diff --git a/help_docs/method_summary.md b/help_docs/method_summary.md index da1331fe..c8dff0ff 100755 --- a/help_docs/method_summary.md +++ b/help_docs/method_summary.md @@ -200,16 +200,15 @@ self.switch_to_default_window() self.switch_to_newest_window() self.get_new_driver( - browser=None, headless=None, locale_code=None, - servername=None, port=None, proxy=None, agent=None, - switch_to=True, cap_file=None, cap_string=None, - disable_csp=None, enable_ws=None, enable_sync=None, - use_auto_ext=None, no_sandbox=None, disable_gpu=None, - incognito=None, guest_mode=None, - devtools=None, remote_debug=None, - swiftshader=None, block_images=None, user_data_dir=None, - extension_zip=None, extension_dir=None, is_mobile=None, - d_width=None, d_height=None, d_p_r=None) + browser=None, headless=None, locale_code=None, protocol=None, + servername=None, port=None, proxy=None, agent=None, switch_to=True, + cap_file=None, cap_string=None, disable_csp=None, enable_ws=None, + enable_sync=None, use_auto_ext=None, no_sandbox=None, disable_gpu=None, + incognito=None, guest_mode=None, devtools=None, remote_debug=None, + swiftshader=None, block_images=None, + chromium_arg=None, firefox_arg=None, firefox_pref=None, + user_data_dir=None, extension_zip=None, extension_dir=None, + is_mobile=None, d_width=None, d_height=None, d_p_r=None) self.switch_to_driver(driver) diff --git a/seleniumbase/utilities/selenium_grid/ReadMe.md b/seleniumbase/utilities/selenium_grid/ReadMe.md index 57969bb0..3e6b4298 100755 --- a/seleniumbase/utilities/selenium_grid/ReadMe.md +++ b/seleniumbase/utilities/selenium_grid/ReadMe.md @@ -1,14 +1,14 @@ [](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md) -

The Selenium Grid Hub:

+

The Selenium Grid Hub:

The Selenium Grid Hub lets you distribute tests to run in parallel across multiple node machines. Each node machine can then run its own allocation of tests. This allows you to run a large suite of tests very quickly. -

Running the Selenium Grid Hub:

+

Running the Selenium Grid Hub:

The following commands will work once you've installed seleniumbase. -

Downloading the Selenium Server JAR file:

+

Downloading the Selenium Server JAR file:

```bash seleniumbase download server @@ -16,7 +16,7 @@ seleniumbase download server * (Required for using your own Selenium Grid) -

Grid Hub server controls:

+

Grid Hub server controls:

```bash seleniumbase grid-hub {start|stop|restart} [OPTIONS] @@ -28,7 +28,7 @@ seleniumbase grid-hub {start|stop|restart} [OPTIONS]
  • --timeout=TIMEOUT (Close idle browser after TIMEOUT sec.)
  • -

    Grid node server controls:

    +

    Grid node server controls:

    ```bash seleniumbase grid-node {start|stop|restart} --hub=[HUB_IP] [OPTIONS] @@ -45,7 +45,7 @@ When the Grid Hub Console is up and running, you'll be able to find it here: [ht Now you can run your tests on the Selenium Grid: ```bash -pytest test_suite.py --server=IP_ADDRESS --port=4444 +pytest test_demo_site.py --server=IP_ADDRESS --port=4444 ``` You can also run your tests on someone else's Selenium Grid to avoid managing your own. Here are some Selenium Grids that you can use (and the run command format): @@ -53,37 +53,38 @@ You can also run your tests on someone else's Selenium Grid to avoid managing yo * [BrowserStack](https://www.browserstack.com/automate#) Selenium Grid: ```bash -pytest my_first_test.py --server=USERNAME:KEY@hub.browserstack.com --port=80 +pytest test_demo_site.py --server=USERNAME:KEY@hub.browserstack.com --port=80 ``` * [Sauce Labs](https://saucelabs.com/products/open-source-frameworks/selenium) Selenium Grid: ```bash -pytest my_first_test.py --server=USERNAME:KEY@ondemand.saucelabs.com --port=80 +pytest test_demo_site.py --server=USERNAME:KEY@ondemand.us-east-1.saucelabs.com --port=443 --protocol=https ``` * [TestingBot](https://testingbot.com/features) Selenium Grid: ```bash -pytest my_first_test.py --server=USERNAME:KEY@hub.testingbot.com --port=80 +pytest test_demo_site.py --server=USERNAME:KEY@hub.testingbot.com --port=80 ``` * [CrossBrowserTesting](https://help.crossbrowsertesting.com/selenium-testing/getting-started/python/) Selenium Grid: ```bash -pytest my_first_test.py --server=USERNAME:KEY@hub.crossbrowsertesting.com --port=80 +pytest test_demo_site.py --server=USERNAME:KEY@hub.crossbrowsertesting.com --port=80 ``` * [LambdaTest](https://www.lambdatest.com/selenium-automation) Selenium Grid: ```bash -pytest my_first_test.py --server=USERNAME:KEY@hub.lambdatest.com --port=80 +pytest test_demo_site.py --server=USERNAME:KEY@hub.lambdatest.com --port=80 ``` To use a server on the ``https`` protocol, add ``--protocol=https``: +(SeleniumBase 1.65.2 and newer uses ``https`` automatically for ``--port=443``.) ```bash -pytest test_suite.py --protocol=https --server=IP_ADDRESS --port=PORT +pytest test_demo_site.py --protocol=https --server=IP_ADDRESS --port=PORT ``` (For setting browser desired capabilities while running Selenium remotely, see the desired capabilities documentation and the sample files located in SeleniumBase/examples/capabilities)