-
Notifications
You must be signed in to change notification settings - Fork 985
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
11 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -426,7 +426,7 @@ pytest --settings-file=custom_settings.py | |
|
||
<h3><img src="https://seleniumbase.github.io/img/green_logo.png" title="SeleniumBase" width="32" /> Running tests on a remote Selenium Grid:</h3> | ||
|
||
🌐 SeleniumBase lets you run tests on remote Selenium Grids such as [BrowserStack](https://www.browserstack.com/automate#)'s Selenium Grid, [LambdaTest](https://www.lambdatest.com/selenium-automation)'s Selenium Grid, [Sauce Labs](https://saucelabs.com/products/open-source-frameworks/selenium)'s Selenium Grid, other Grids, and even your own Grid: | ||
🌐 SeleniumBase lets you run tests on remote Selenium Grids such as [BrowserStack](https://www.browserstack.com/automate#)'s Selenium Grid, [Sauce Labs](https://saucelabs.com/products/open-source-frameworks/selenium)'s Selenium Grid, other Grids, and even your own Grid: | ||
|
||
🌐 For setting browser desired capabilities while running Selenium remotely, see the ReadMe located here: https://github.com/seleniumbase/SeleniumBase/tree/master/examples/capabilities | ||
|
||
|
@@ -442,24 +442,6 @@ Here's how to connect to a Sauce Labs Selenium Grid server for running tests: | |
pytest test_demo_site.py --server=USERNAME:[email protected] --port=443 --protocol=https | ||
``` | ||
|
||
Here's how to connect to a Perfecto Selenium Grid server for running tests: | ||
|
||
```bash | ||
pytest test_demo_site.py --server=USERNAME:[email protected]/nexperience/perfectomobile --port=443 | ||
``` | ||
|
||
Here's how to connect to a TestingBot Selenium Grid server for running tests: | ||
|
||
```bash | ||
pytest test_demo_site.py --server=USERNAME:[email protected] --port=80 | ||
``` | ||
|
||
Here's how to connect to a LambdaTest Selenium Grid server for running tests: | ||
|
||
```bash | ||
pytest test_demo_site.py --server=USERNAME:[email protected] --port=80 | ||
``` | ||
|
||
Here's how to connect to a CrossBrowserTesting Selenium Grid server for running tests: | ||
|
||
```bash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,18 +2,14 @@ | |
|
||
## [<img src="https://seleniumbase.github.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Using Desired Capabilities | ||
|
||
You can specify browser capabilities when running SeleniumBase tests on a remote Selenium Grid server such as <a href="https://www.browserstack.com/automate/capabilities" target="_blank">BrowserStack</a>, <a href="https://www.lambdatest.com/capabilities-generator/" target="_blank">LambdaTest</a>, or <a href="https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/" target="_blank">Sauce Labs</a>. | ||
You can specify browser capabilities when running SeleniumBase tests on a remote Selenium Grid server such as <a href="https://www.browserstack.com/automate/capabilities" target="_blank">BrowserStack</a> or <a href="https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/" target="_blank">Sauce Labs</a>. | ||
|
||
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 test_demo_site.py --browser=remote --server=USERNAME:[email protected] --port=80 --cap_file=capabilities/sample_cap_file_BS.py | ||
``` | ||
|
||
```bash | ||
pytest test_demo_site.py --browser=remote --server=USERNAME:KEY@https://@hub.lambdatest.com --port=80 --protocol=https --cap_file=capabilities/sample_cap_file_LT.py | ||
``` | ||
|
||
```bash | ||
pytest test_demo_site.py --browser=remote --server=USERNAME:[email protected] --port=443 --protocol=https --cap_file=capabilities/sample_cap_file_SL.py | ||
``` | ||
|
@@ -34,20 +30,6 @@ desired_cap = { | |
} | ||
``` | ||
|
||
Here's an example desired capabilities file for LambdaTest: | ||
|
||
```python | ||
capabilities = { | ||
"build" : "your build name", | ||
"name" : "your test name", | ||
"platform" : "Windows 11", | ||
"browserName" : "Chrome", | ||
"version" : "101.0", | ||
"timezone" : "UTC+05:30", | ||
"geoLocation" : "IN", | ||
} | ||
``` | ||
|
||
Here's an example desired capabilities file for Sauce Labs: | ||
|
||
```python | ||
|
@@ -65,7 +47,6 @@ capabilities = { | |
|
||
<ul> | ||
<li><a href="https://www.browserstack.com/automate/capabilities" target="_blank">BrowserStack desired capabilities</a></li> | ||
<li><a href="https://www.lambdatest.com/capabilities-generator/" target="_blank">LambdaTest desired capabilities</a></li> | ||
<li><a href="https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/" target="_blank">Sauce Labs desired capabilities</a></li> | ||
</ul> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3698,14 +3698,13 @@ def get_new_driver( | |
raise Exception( | ||
'Cannot use "remote" browser driver on localhost!' | ||
" Did you mean to connect to a remote Grid server" | ||
" such as BrowserStack, LambdaTest, or Sauce Labs?" | ||
" such as BrowserStack or Sauce Labs?" | ||
' If so, you must specify the "server" and "port"' | ||
" parameters on the command line! " | ||
"Example: " | ||
"--server=user:[email protected] --port=80" | ||
) | ||
browserstack_ref = "https://browserstack.com/automate/capabilities" | ||
lambdatest_ref = "https://www.lambdatest.com/capabilities-generator" | ||
sauce_labs_ref = ( | ||
"https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/" | ||
) | ||
|
@@ -3714,13 +3713,11 @@ def get_new_driver( | |
"Need to specify a desired capabilities file when " | ||
'using "--browser=remote". Add "--cap_file=FILE". ' | ||
"File should be in the Python format used by: " | ||
"%s, " | ||
"%s, OR " | ||
"%s " | ||
"See SeleniumBase/examples/capabilities/sample_cap_file_BS.py," | ||
" SeleniumBase/examples/capabilities/sample_cap_file_LT.py," | ||
"%s OR %s \n" | ||
"(See SeleniumBase/examples/capabilities/sample_cap_file_BS.py" | ||
" and SeleniumBase/examples/capabilities/sample_cap_file_SL.py" | ||
% (browserstack_ref, lambdatest_ref, sauce_labs_ref) | ||
" for examples!)" | ||
% (browserstack_ref, sauce_labs_ref) | ||
) | ||
if browser is None: | ||
browser = self.browser | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,24 +64,6 @@ pytest test_demo_site.py --server=USERNAME:[email protected] --port=80 | |
pytest test_demo_site.py --server=USERNAME:[email protected] --port=443 --protocol=https | ||
``` | ||
|
||
* [Perfecto](https://www.perfecto.io/integrations/selenium) Selenium Grid: | ||
|
||
```bash | ||
pytest test_demo_site.py --server=USERNAME:[email protected]/nexperience/perfectomobile --port=443 | ||
``` | ||
|
||
* [TestingBot](https://testingbot.com/features) Selenium Grid: | ||
|
||
```bash | ||
pytest test_demo_site.py --server=USERNAME:[email protected] --port=80 | ||
``` | ||
|
||
* [LambdaTest](https://www.lambdatest.com/selenium-automation) Selenium Grid: | ||
|
||
```bash | ||
pytest test_demo_site.py --server=USERNAME:[email protected] --port=80 | ||
``` | ||
|
||
* [CrossBrowserTesting](https://help.crossbrowsertesting.com/selenium-testing/getting-started/python/) Selenium Grid: | ||
|
||
```bash | ||
|