From 0d3591334a09b067ca999f2f55d308fba6318d55 Mon Sep 17 00:00:00 2001 From: Simon Benzer Date: Tue, 24 Sep 2024 13:37:54 -0400 Subject: [PATCH] Added Java Example --- .../dev/selenium/selenium_manager/usage.java | 24 +++++++++++++++++++ .../documentation/selenium_manager.en.md | 7 ++++-- .../documentation/selenium_manager.ja.md | 7 ++++-- .../documentation/selenium_manager.pt-br.md | 7 ++++-- .../documentation/selenium_manager.zh-cn.md | 7 ++++-- 5 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 examples/java/src/test/java/dev/selenium/selenium_manager/usage.java diff --git a/examples/java/src/test/java/dev/selenium/selenium_manager/usage.java b/examples/java/src/test/java/dev/selenium/selenium_manager/usage.java new file mode 100644 index 000000000000..7013b30ad971 --- /dev/null +++ b/examples/java/src/test/java/dev/selenium/selenium_manager/usage.java @@ -0,0 +1,24 @@ +package dev.selenium.selenium_manager; + +import org.junit.jupiter.api.Test; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.chrome.ChromeDriver; + +public class usage { + + @Test + public void testSetupWithoutManager() { + System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver"); + WebDriver driver = new ChromeDriver(); + driver.get("https://www.selenium.dev/documentation/selenium_manager/"); + driver.quit(); + } + + @Test + public void testSetupWithManager() { + WebDriver driver = new ChromeDriver(); + driver.get("https://www.selenium.dev/documentation/selenium_manager/"); + driver.quit(); + } + +} diff --git a/website_and_docs/content/documentation/selenium_manager.en.md b/website_and_docs/content/documentation/selenium_manager.en.md index 86dea97d1806..63c69e49b911 100644 --- a/website_and_docs/content/documentation/selenium_manager.en.md +++ b/website_and_docs/content/documentation/selenium_manager.en.md @@ -212,8 +212,11 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c ### Implementing Selenium Manager in Your Scripts {{< tabpane text=true >}} -{{< tab header="Java" >}} -{{< badge-code >}} +{{% tab header="Java" %}} +**Previously** +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L10-L15" >}} +**Selenium Manager** +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L18-L22" >}} {{< /tab >}} {{% tab header="Python" %}} **Previously** diff --git a/website_and_docs/content/documentation/selenium_manager.ja.md b/website_and_docs/content/documentation/selenium_manager.ja.md index 463b984231e1..595e16138a7e 100644 --- a/website_and_docs/content/documentation/selenium_manager.ja.md +++ b/website_and_docs/content/documentation/selenium_manager.ja.md @@ -212,8 +212,11 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c ### Implementing Selenium Manager in Your Scripts {{< tabpane text=true >}} -{{< tab header="Java" >}} -{{< badge-code >}} +{{% tab header="Java" %}} +**Previously** +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L10-L15" >}} +**Selenium Manager** +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L18-L22" >}} {{< /tab >}} {{% tab header="Python" %}} **Previously** diff --git a/website_and_docs/content/documentation/selenium_manager.pt-br.md b/website_and_docs/content/documentation/selenium_manager.pt-br.md index 463b984231e1..595e16138a7e 100644 --- a/website_and_docs/content/documentation/selenium_manager.pt-br.md +++ b/website_and_docs/content/documentation/selenium_manager.pt-br.md @@ -212,8 +212,11 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c ### Implementing Selenium Manager in Your Scripts {{< tabpane text=true >}} -{{< tab header="Java" >}} -{{< badge-code >}} +{{% tab header="Java" %}} +**Previously** +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L10-L15" >}} +**Selenium Manager** +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L18-L22" >}} {{< /tab >}} {{% tab header="Python" %}} **Previously** diff --git a/website_and_docs/content/documentation/selenium_manager.zh-cn.md b/website_and_docs/content/documentation/selenium_manager.zh-cn.md index 463b984231e1..595e16138a7e 100644 --- a/website_and_docs/content/documentation/selenium_manager.zh-cn.md +++ b/website_and_docs/content/documentation/selenium_manager.zh-cn.md @@ -212,8 +212,11 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c ### Implementing Selenium Manager in Your Scripts {{< tabpane text=true >}} -{{< tab header="Java" >}} -{{< badge-code >}} +{{% tab header="Java" %}} +**Previously** +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L10-L15" >}} +**Selenium Manager** +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L18-L22" >}} {{< /tab >}} {{% tab header="Python" %}} **Previously**