Skip to content

Commit

Permalink
mark legacy and recommneded way of enablding CDP/BiDi
Browse files Browse the repository at this point in the history
  • Loading branch information
gkapkowski-saucelabs committed Sep 26, 2024
1 parent 8e9ef52 commit d0be8a6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/web-apps/automated-testing/cdp.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ public class SauceLabsTest {
HashMap<String, Object> sauceOptions = new HashMap<>();
sauceOptions.put("username", System.getenv("SAUCE_USERNAME"));
sauceOptions.put("accessKey", System.getenv("SAUCE_ACCESS_KEY"));
sauceOptions.put("devTools", true);
sauceOptions.put("devTools", true); // Legacy
sauceOptions.put("name", "My Selenium CDP Test");

options.setCapability("sauce:options", sauceOptions);
options.setCapability("webSocketUrl", true);
options.setCapability("webSocketUrl", true); // Recommended

Check warning on line 60 in docs/web-apps/automated-testing/cdp.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/web-apps/automated-testing/cdp.md#L60

[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.
Raw output
{"message": "[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.", "location": {"path": "docs/web-apps/automated-testing/cdp.md", "range": {"start": {"line": 60, "column": 68}}}, "severity": "WARNING"}

String sauceUrl = "https://ondemand.us-west-1.saucelabs.com/wd/hub";
// Alternatively use EU datacenter
Expand All @@ -81,11 +81,11 @@ options.platform_name = 'Windows 10'

sauce_options = {'username': os.environ["SAUCE_USERNAME"],
'accessKey': os.environ["SAUCE_ACCESS_KEY"],
'devTools': True,
'devTools': True, # Legacy
'name': 'My Selenium CDP Test'}

options.set_capability('sauce:options', sauce_options)
options.set_capability('webSocketUrl', True)
options.set_capability('webSocketUrl', True) # Recommended
sauce_url = "https://ondemand.us-west-1.saucelabs.com/wd/hub"
# Alternatively use EU datacenter
# sauce_url = "https://ondemand.eu-central-1.saucelabs.com/wd/hub"
Expand All @@ -110,12 +110,12 @@ options.platform_name = 'Windows 10';
const sauce_options = {
'username': SAUCE_USERNAME,
'accessKey': SAUCE_ACCESS_KEY,
'devTools': true,
'devTools': true, // Legacy
'name': 'My Selenium CDP Test'
};

options.set_capability('sauce:options', sauce_options);
options.set_capability('websocketUrl', true);
options.set_capability('websocketUrl', true); // Recommended

const sauce_url = "https://ondemand.us-west-1.saucelabs.com/wd/hub";
// Alternatively use EU datacenter
Expand Down

0 comments on commit d0be8a6

Please sign in to comment.