diff --git a/examples/python/tests/selenium_manager/usage.py b/examples/python/tests/selenium_manager/usage.py new file mode 100644 index 000000000000..c9e93ca542b0 --- /dev/null +++ b/examples/python/tests/selenium_manager/usage.py @@ -0,0 +1,12 @@ +from selenium import webdriver +from selenium.webdriver.common.by import By +from selenium.webdriver.chrome.service import Service + +def setup_without_selenium_manager(): + chrome_service = Service(executable_path='path/to/chrome.exe') + driver = webdriver.Chrome(chrome_service) + return driver + +def setup_with_selenium_manager(): + driver = webdriver.Chrome() + return driver \ No newline at end of file diff --git a/website_and_docs/content/documentation/selenium_manager.en.md b/website_and_docs/content/documentation/selenium_manager.en.md index 1fabb70e67ec..157fd982d751 100644 --- a/website_and_docs/content/documentation/selenium_manager.en.md +++ b/website_and_docs/content/documentation/selenium_manager.en.md @@ -209,6 +209,29 @@ INFO Driver path: C:\Users\boni\.cache\selenium\chromedriver\win64\117.0.5938 INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\chrome.exe ``` +### Implementing Selenium Manager in Your Scripts + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{% tab header="Python" %}} +**Previously** +{{< gh-codeblock path="examples/python/tests/selenium_manager/usage.py#L5-L8" >}} +**Selenium Manager** +{{< gh-codeblock path="examples/python/tests/selenium_manager/usage.py#L10-L12" >}} +{{< badge-code >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< badge-code >}} +{{< /tab >}} +{{< /tabpane >}} + ## Selenium Grid Selenium Manager allows you to configure the drivers automatically when setting up Selenium Grid. To that aim, you need to include the argument `--selenium-manager true` in the command to start Selenium Grid. For more details, visit the [Selenium Grid starting page](https://www.selenium.dev/documentation/grid/getting_started/). diff --git a/website_and_docs/content/documentation/selenium_manager.ja.md b/website_and_docs/content/documentation/selenium_manager.ja.md index 1fabb70e67ec..157fd982d751 100644 --- a/website_and_docs/content/documentation/selenium_manager.ja.md +++ b/website_and_docs/content/documentation/selenium_manager.ja.md @@ -209,6 +209,29 @@ INFO Driver path: C:\Users\boni\.cache\selenium\chromedriver\win64\117.0.5938 INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\chrome.exe ``` +### Implementing Selenium Manager in Your Scripts + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{% tab header="Python" %}} +**Previously** +{{< gh-codeblock path="examples/python/tests/selenium_manager/usage.py#L5-L8" >}} +**Selenium Manager** +{{< gh-codeblock path="examples/python/tests/selenium_manager/usage.py#L10-L12" >}} +{{< badge-code >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< badge-code >}} +{{< /tab >}} +{{< /tabpane >}} + ## Selenium Grid Selenium Manager allows you to configure the drivers automatically when setting up Selenium Grid. To that aim, you need to include the argument `--selenium-manager true` in the command to start Selenium Grid. For more details, visit the [Selenium Grid starting page](https://www.selenium.dev/documentation/grid/getting_started/). 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 1fabb70e67ec..157fd982d751 100644 --- a/website_and_docs/content/documentation/selenium_manager.pt-br.md +++ b/website_and_docs/content/documentation/selenium_manager.pt-br.md @@ -209,6 +209,29 @@ INFO Driver path: C:\Users\boni\.cache\selenium\chromedriver\win64\117.0.5938 INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\chrome.exe ``` +### Implementing Selenium Manager in Your Scripts + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{% tab header="Python" %}} +**Previously** +{{< gh-codeblock path="examples/python/tests/selenium_manager/usage.py#L5-L8" >}} +**Selenium Manager** +{{< gh-codeblock path="examples/python/tests/selenium_manager/usage.py#L10-L12" >}} +{{< badge-code >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< badge-code >}} +{{< /tab >}} +{{< /tabpane >}} + ## Selenium Grid Selenium Manager allows you to configure the drivers automatically when setting up Selenium Grid. To that aim, you need to include the argument `--selenium-manager true` in the command to start Selenium Grid. For more details, visit the [Selenium Grid starting page](https://www.selenium.dev/documentation/grid/getting_started/). 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 1fabb70e67ec..157fd982d751 100644 --- a/website_and_docs/content/documentation/selenium_manager.zh-cn.md +++ b/website_and_docs/content/documentation/selenium_manager.zh-cn.md @@ -209,6 +209,29 @@ INFO Driver path: C:\Users\boni\.cache\selenium\chromedriver\win64\117.0.5938 INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\chrome.exe ``` +### Implementing Selenium Manager in Your Scripts + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{% tab header="Python" %}} +**Previously** +{{< gh-codeblock path="examples/python/tests/selenium_manager/usage.py#L5-L8" >}} +**Selenium Manager** +{{< gh-codeblock path="examples/python/tests/selenium_manager/usage.py#L10-L12" >}} +{{< badge-code >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< badge-code >}} +{{< /tab >}} +{{< /tabpane >}} + ## Selenium Grid Selenium Manager allows you to configure the drivers automatically when setting up Selenium Grid. To that aim, you need to include the argument `--selenium-manager true` in the command to start Selenium Grid. For more details, visit the [Selenium Grid starting page](https://www.selenium.dev/documentation/grid/getting_started/).