Skip to content

Commit 1d3ffc6

Browse files
committed
Add Safari-specific JavaScript tests for logging configuration
1 parent 18b7f8d commit 1d3ffc6

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

Diff for: examples/javascript/test/browser/safariSpecificCap.spec.js

+19
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,23 @@ describe('Should be able to Test Command line arguments', function () {
1313
await driver.get('https://www.selenium.dev/selenium/web/blank.html');
1414
await driver.quit();
1515
});
16+
});
17+
18+
describe('Should be able to enable Safari logging', function () {
19+
this.timeout(15000);
20+
(process.platform === 'darwin' ? it : it.skip)('enableLogs', async function () {
21+
const options = new safari.Options()
22+
.setLoggingPrefs({ browser: 'ALL' }); // Enable browser-level logging
23+
24+
let driver = new Builder()
25+
.forBrowser(Browser.SAFARI)
26+
.setSafariOptions(options)
27+
.build();
28+
29+
try {
30+
await driver.get('https://www.selenium.dev/');
31+
} finally {
32+
await driver.quit();
33+
}
34+
});
1635
});

Diff for: website_and_docs/content/documentation/webdriver/browsers/safari.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Property value: `"true"` or `"false"`
7979
{{< gh-codeblock path="examples/ruby/spec/browsers/safari_spec.rb#L20" >}}
8080
{{< /tab >}}
8181
{{< tab header="JavaScript" >}}
82-
{{< badge-code >}}
82+
{{< gh-codeblock path="/examples/javascript/test/browser/safariSpecificCap.spec.js#L22" >}}
8383
{{< /tab >}}
8484
{{< tab header="Kotlin" >}}
8585
{{< badge-code >}}

Diff for: website_and_docs/content/documentation/webdriver/browsers/safari.ja.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Property value: `"true"` or `"false"`
7878
{{< gh-codeblock path="examples/ruby/spec/browsers/safari_spec.rb#L20" >}}
7979
{{< /tab >}}
8080
{{< tab header="JavaScript" >}}
81-
{{< badge-code >}}
81+
{{< gh-codeblock path="/examples/javascript/test/browser/safariSpecificCap.spec.js#L22" >}}
8282
{{< /tab >}}
8383
{{< tab header="Kotlin" >}}
8484
{{< badge-code >}}

Diff for: website_and_docs/content/documentation/webdriver/browsers/safari.pt-br.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Property value: `"true"` or `"false"`
7878
{{< gh-codeblock path="examples/ruby/spec/browsers/safari_spec.rb#L20" >}}
7979
{{< /tab >}}
8080
{{< tab header="JavaScript" >}}
81-
{{< badge-code >}}
81+
{{< gh-codeblock path="/examples/javascript/test/browser/safariSpecificCap.spec.js#L22" >}}
8282
{{< /tab >}}
8383
{{< tab header="Kotlin" >}}
8484
{{< badge-code >}}

0 commit comments

Comments
 (0)