Skip to content
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

docs/drivers/remote: fix desired capabilities #1214

Merged
merged 1 commit into from
Nov 15, 2023
Merged
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
24 changes: 17 additions & 7 deletions docs/drivers/remote.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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))
Expand Down