-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs/drivers/remote: fix desired capabilities (#1214)
Closes #1213.
- Loading branch information
Showing
1 changed file
with
17 additions
and
7 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 |
---|---|---|
|
@@ -37,9 +37,18 @@ browser instance running on Windows 11. | |
|
||
.. code-block:: python | ||
from selenium.webdriver.chrome.options import Options | ||
from splinter import Browser | ||
# Specify the server URL | ||
remote_server_url = 'http://YOUR_LT_USERNAME:YOUR_LT_ACCESS_KEY@@hub.lambdatest.com/wd/hub' | ||
# Configure desired capabilities | ||
options = Options() | ||
options.set_capability('platform', 'Windows 11') | ||
options.set_capability('version', '99.0') | ||
options.set_capability('name', 'Test of Chrome 99 on WINDOWS') | ||
with Browser( | ||
driver_name="remote", | ||
browser='Chrome', | ||
|
@@ -57,26 +66,27 @@ browser instance running on Windows 11. | |
The following example uses `Sauce Labs`_ (a company that provides Selenium | ||
Remote WebDriver servers as a service) to request an Internet Explorer 9 | ||
browser instance running on Windows 7. | ||
|
||
.. code-block:: python | ||
from selenium.webdriver.ie.options import Options | ||
from splinter import Browser | ||
# Specify the server URL | ||
remote_server_url = 'http://YOUR_SAUCE_USERNAME:[email protected]:80/wd/hub' | ||
options = Options() | ||
options.set_capability('platform', 'Windows 7') | ||
options.set_capability('version', '9') | ||
options.set_capability('name', 'Test of IE 9 on WINDOWS') | ||
with Browser( | ||
driver_name="remote", | ||
browser='internetexplorer', | ||
command_executor=remote_server_url, | ||
desired_capabilities = { | ||
'platform': 'Windows 7', | ||
'version': '9', | ||
'name': 'Test of IE 9 on WINDOWS', | ||
}, | ||
keep_alive=True, | ||
options=options, | ||
) as browser: | ||
print("Link to job: https://saucelabs.com/jobs/{}".format( | ||
browser.driver.session_id)) | ||
|