Skip to content

Commit 6a7303a

Browse files
authored
Added Javascript Example to Selenium Manager (#1968)
* Added Javascript Example to Selenium Manager * removed GetBinaryPaths * updates description, removes old test from CI * tweak
1 parent e5068fd commit 6a7303a

File tree

5 files changed

+52
-8
lines changed

5 files changed

+52
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
const Chrome = require('selenium-webdriver/chrome');
2+
const {Browser, Builder} = require("selenium-webdriver");
3+
const options = new Chrome.Options();
4+
5+
describe('Usage Test', function () {
6+
it('Creates driver wit Selenium Manager', async function () {
7+
8+
let driver = new Builder()
9+
.forBrowser(Browser.CHROME)
10+
.build();
11+
12+
await driver.get('https://www.selenium.dev/selenium/web/blank.html');
13+
await driver.quit();
14+
});
15+
16+
// it('Creates driver with Selenium Manager', async function () {
17+
// let driverPath = '/path/to/chromedriver';
18+
// let browserPath = '/path/to/chrome';
19+
20+
// options.setChromeBinaryPath(browserPath)
21+
22+
// let service = new Chrome.ServiceBuilder().setPath(driverPath)
23+
24+
// let driver = new Builder()
25+
// .forBrowser(Browser.CHROME)
26+
// .setChromeService(service)
27+
// .build();
28+
29+
// await driver.get('https://www.selenium.dev/selenium/web/blank.html');
30+
// await driver.quit();
31+
// });
32+
});

website_and_docs/content/documentation/selenium_manager.en.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,11 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c
240240
**Selenium Manager**
241241
{{< gh-codeblock path="examples/ruby/spec/selenium_manager/usage.rb#L12-L16" >}}
242242
{{< /tab >}}
243-
{{< tab header="JavaScript" >}}
244-
{{< badge-code >}}
243+
{{% tab header="JavaScript" %}}
244+
**Previously**
245+
{{< gh-codeblock path="examples/javascript/test/selenium_manager/usage.spec.js#L16-L31" >}}
246+
**Selenium Manager**
247+
{{< gh-codeblock path="examples/javascript/test/selenium_manager/usage.spec.js#L6-L14" >}}
245248
{{< /tab >}}
246249
{{< tab header="Kotlin" >}}
247250
{{< badge-code >}}

website_and_docs/content/documentation/selenium_manager.ja.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,11 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c
240240
**Selenium Manager**
241241
{{< gh-codeblock path="examples/ruby/spec/selenium_manager/usage.rb#L12-L16" >}}
242242
{{< /tab >}}
243-
{{< tab header="JavaScript" >}}
244-
{{< badge-code >}}
243+
{{% tab header="JavaScript" %}}
244+
**Previously**
245+
{{< gh-codeblock path="examples/javascript/test/selenium_manager/usage.spec.js#L16-L31" >}}
246+
**Selenium Manager**
247+
{{< gh-codeblock path="examples/javascript/test/selenium_manager/usage.spec.js#L6-L14" >}}
245248
{{< /tab >}}
246249
{{< tab header="Kotlin" >}}
247250
{{< badge-code >}}

website_and_docs/content/documentation/selenium_manager.pt-br.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,11 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c
240240
**Selenium Manager**
241241
{{< gh-codeblock path="examples/ruby/spec/selenium_manager/usage.rb#L12-L16" >}}
242242
{{< /tab >}}
243-
{{< tab header="JavaScript" >}}
244-
{{< badge-code >}}
243+
{{% tab header="JavaScript" %}}
244+
**Previously**
245+
{{< gh-codeblock path="examples/javascript/test/selenium_manager/usage.spec.js#L16-L31" >}}
246+
**Selenium Manager**
247+
{{< gh-codeblock path="examples/javascript/test/selenium_manager/usage.spec.js#L6-L14" >}}
245248
{{< /tab >}}
246249
{{< tab header="Kotlin" >}}
247250
{{< badge-code >}}

website_and_docs/content/documentation/selenium_manager.zh-cn.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,11 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c
346346
**Selenium Manager**
347347
{{< gh-codeblock path="examples/ruby/spec/selenium_manager/usage.rb#L12-L16" >}}
348348
{{< /tab >}}
349-
{{< tab header="JavaScript" >}}
350-
{{< badge-code >}}
349+
{{% tab header="JavaScript" %}}
350+
**Previously**
351+
{{< gh-codeblock path="examples/javascript/test/selenium_manager/usage.spec.js#L16-L31" >}}
352+
**Selenium Manager**
353+
{{< gh-codeblock path="examples/javascript/test/selenium_manager/usage.spec.js#L6-L14" >}}
351354
{{< /tab >}}
352355
{{< tab header="Kotlin" >}}
353356
{{< badge-code >}}

0 commit comments

Comments
 (0)