From 0d3591334a09b067ca999f2f55d308fba6318d55 Mon Sep 17 00:00:00 2001 From: Simon Benzer Date: Tue, 24 Sep 2024 13:37:54 -0400 Subject: [PATCH 1/3] 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** From e251d0b602c8be3119c4795d1f006d67f95639fd Mon Sep 17 00:00:00 2001 From: Simon Benzer <69980130+shbenzer@users.noreply.github.com> Date: Fri, 3 Jan 2025 12:31:50 -0500 Subject: [PATCH 2/3] Update examples/java/src/test/java/dev/selenium/selenium_manager/usage.java Co-authored-by: Sri Harsha <12621691+harsha509@users.noreply.github.com> --- .../java/src/test/java/dev/selenium/selenium_manager/usage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 7013b30ad971..857c4a746f3f 100644 --- a/examples/java/src/test/java/dev/selenium/selenium_manager/usage.java +++ b/examples/java/src/test/java/dev/selenium/selenium_manager/usage.java @@ -4,7 +4,7 @@ import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; -public class usage { +public class SeleniumManagerUsageDemo { @Test public void testSetupWithoutManager() { From f1ae84fb24b4cf2cd0548ab327b7d448c5414dc4 Mon Sep 17 00:00:00 2001 From: Sri Harsha Date: Mon, 6 Jan 2025 14:35:38 +0530 Subject: [PATCH 3/3] [java] fix code sample --- .../{usage.java => SeleniumManagerUsageDemo.java} | 0 website_and_docs/content/documentation/selenium_manager.en.md | 4 ++-- website_and_docs/content/documentation/selenium_manager.ja.md | 4 ++-- .../content/documentation/selenium_manager.pt-br.md | 4 ++-- .../content/documentation/selenium_manager.zh-cn.md | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) rename examples/java/src/test/java/dev/selenium/selenium_manager/{usage.java => SeleniumManagerUsageDemo.java} (100%) diff --git a/examples/java/src/test/java/dev/selenium/selenium_manager/usage.java b/examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java similarity index 100% rename from examples/java/src/test/java/dev/selenium/selenium_manager/usage.java rename to examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java diff --git a/website_and_docs/content/documentation/selenium_manager.en.md b/website_and_docs/content/documentation/selenium_manager.en.md index c8dd69e42c35..0ae0bd890b8b 100644 --- a/website_and_docs/content/documentation/selenium_manager.en.md +++ b/website_and_docs/content/documentation/selenium_manager.en.md @@ -221,9 +221,9 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c {{< tabpane text=true >}} {{% tab header="Java" %}} **Previously** -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L10-L15" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L10-L15" >}} **Selenium Manager** -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L18-L22" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.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 f17d6c09697e..f52274f03364 100644 --- a/website_and_docs/content/documentation/selenium_manager.ja.md +++ b/website_and_docs/content/documentation/selenium_manager.ja.md @@ -221,9 +221,9 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c {{< tabpane text=true >}} {{% tab header="Java" %}} **Previously** -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L10-L15" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L10-L15" >}} **Selenium Manager** -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L18-L22" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.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 f17d6c09697e..f52274f03364 100644 --- a/website_and_docs/content/documentation/selenium_manager.pt-br.md +++ b/website_and_docs/content/documentation/selenium_manager.pt-br.md @@ -221,9 +221,9 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c {{< tabpane text=true >}} {{% tab header="Java" %}} **Previously** -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L10-L15" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L10-L15" >}} **Selenium Manager** -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L18-L22" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.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 f17d6c09697e..f52274f03364 100644 --- a/website_and_docs/content/documentation/selenium_manager.zh-cn.md +++ b/website_and_docs/content/documentation/selenium_manager.zh-cn.md @@ -221,9 +221,9 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c {{< tabpane text=true >}} {{% tab header="Java" %}} **Previously** -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L10-L15" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L10-L15" >}} **Selenium Manager** -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/usage.java#L18-L22" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L18-L22" >}} {{< /tab >}} {{% tab header="Python" %}} **Previously**