diff --git a/examples/javascript/test/browser/safariSpecificCap.spec.js b/examples/javascript/test/browser/safariSpecificCap.spec.js index 8bda5240cdf0..33a2e98c2918 100644 --- a/examples/javascript/test/browser/safariSpecificCap.spec.js +++ b/examples/javascript/test/browser/safariSpecificCap.spec.js @@ -13,4 +13,23 @@ describe('Should be able to Test Command line arguments', function () { await driver.get('https://www.selenium.dev/selenium/web/blank.html'); await driver.quit(); }); +}); + +describe('Should be able to enable Safari logging', function () { + this.timeout(15000); + (process.platform === 'darwin' ? it : it.skip)('enableLogs', async function () { + const options = new safari.Options() + .setLoggingPrefs({ browser: 'ALL' }); // Enable browser-level logging + + let driver = new Builder() + .forBrowser(Browser.SAFARI) + .setSafariOptions(options) + .build(); + + try { + await driver.get('https://www.selenium.dev/'); + } finally { + await driver.quit(); + } + }); }); \ No newline at end of file diff --git a/website_and_docs/content/documentation/webdriver/browsers/safari.en.md b/website_and_docs/content/documentation/webdriver/browsers/safari.en.md index 16896ea78e8b..1a782480907a 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/safari.en.md +++ b/website_and_docs/content/documentation/webdriver/browsers/safari.en.md @@ -80,7 +80,7 @@ Property value: `"true"` or `"false"` {{< gh-codeblock path="examples/ruby/spec/browsers/safari_spec.rb#L20" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< gh-codeblock path="/examples/javascript/test/browser/safariSpecificCap.spec.js#L22" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/safari.ja.md b/website_and_docs/content/documentation/webdriver/browsers/safari.ja.md index 01cad91dacf8..369062cc0944 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/safari.ja.md +++ b/website_and_docs/content/documentation/webdriver/browsers/safari.ja.md @@ -79,7 +79,7 @@ Property value: `"true"` or `"false"` {{< gh-codeblock path="examples/ruby/spec/browsers/safari_spec.rb#L20" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< gh-codeblock path="/examples/javascript/test/browser/safariSpecificCap.spec.js#L22" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/safari.pt-br.md b/website_and_docs/content/documentation/webdriver/browsers/safari.pt-br.md index 85c075cd7076..88daa3eda387 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/safari.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/browsers/safari.pt-br.md @@ -79,7 +79,7 @@ Property value: `"true"` or `"false"` {{< gh-codeblock path="examples/ruby/spec/browsers/safari_spec.rb#L20" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< gh-codeblock path="/examples/javascript/test/browser/safariSpecificCap.spec.js#L22" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}}