diff --git a/examples/python/tests/getting_started/using_selenium_tests.py b/examples/python/tests/getting_started/using_selenium_tests.py index b2f8f830050d..efac8c0cfc3d 100644 --- a/examples/python/tests/getting_started/using_selenium_tests.py +++ b/examples/python/tests/getting_started/using_selenium_tests.py @@ -3,9 +3,7 @@ def test_eight_components(): - driver = webdriver.Chrome() - - driver.get("https://www.selenium.dev/selenium/web/web-form.html") + driver = setup() title = driver.title assert title == "Web form" @@ -22,7 +20,7 @@ def test_eight_components(): value = message.text assert value == "Received!" - driver.quit() + teardown(driver) def setup(): driver = webdriver.Chrome() diff --git a/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.en.md b/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.en.md index 9e0173fd99d0..ed89a4292042 100644 --- a/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.en.md +++ b/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.en.md @@ -143,7 +143,7 @@ In your project's `package.json`, add requirement to `dependencies`: {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/UsingSeleniumTest.java#L30-L31" >}} {{< /tab >}} {{% tab header="Python" %}} -{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L10-L11" >}} +{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L8-L9" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/GettingStarted/UsingSeleniumTest.cs#L19-L20" >}} @@ -177,11 +177,11 @@ In your project's `package.json`, add requirement to `dependencies`: ### Set Up -{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L27-L30" >}} +{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L25-L28" >}} ### Tear Down -{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L32-33" >}} +{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L30-31" >}} {{% /tab %}} {{< tab header="CSharp" >}} diff --git a/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.ja.md b/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.ja.md index 71530e8273fa..2b538ea5043e 100644 --- a/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.ja.md +++ b/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.ja.md @@ -139,7 +139,7 @@ In your project's `package.json`, add requirement to `dependencies`: {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/UsingSeleniumTest.java#L30-L31" >}} {{< /tab >}} {{% tab header="Python" %}} -{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L10-L11" >}} +{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L8-L9" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/GettingStarted/UsingSeleniumTest.cs#L19-L20" >}} @@ -173,11 +173,11 @@ In your project's `package.json`, add requirement to `dependencies`: ### Set Up -{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L27-L30" >}} +{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L25-L28" >}} ### Tear Down -{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L32-33" >}} +{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L30-31" >}} {{% /tab %}} {{< tab header="CSharp" >}} diff --git a/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.pt-br.md b/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.pt-br.md index 1a2e0c147555..deac879f22dc 100644 --- a/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.pt-br.md @@ -139,7 +139,7 @@ In your project's `package.json`, adicionar requisito às `dependências`: {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/UsingSeleniumTest.java#L30-L31" >}} {{< /tab >}} {{% tab header="Python" %}} -{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L10-L11" >}} +{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L8-L9" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/GettingStarted/UsingSeleniumTest.cs#L19-L20" >}} @@ -173,11 +173,11 @@ In your project's `package.json`, adicionar requisito às `dependências`: ### Set Up -{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L27-L30" >}} +{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L25-L28" >}} ### Tear Down -{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L32-33" >}} +{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L30-31" >}} {{% /tab %}} {{< tab header="CSharp" >}} diff --git a/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.zh-cn.md b/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.zh-cn.md index c52f0da8df12..2d16336a15c4 100644 --- a/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/getting_started/using_selenium.zh-cn.md @@ -123,7 +123,7 @@ In your project's `package.json`, add requirement to `dependencies`: {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/UsingSeleniumTest.java#L30-L31" >}} {{< /tab >}} {{% tab header="Python" %}} -{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L10-L11" >}} +{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L8-L9" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/GettingStarted/UsingSeleniumTest.cs#L19-L20" >}} @@ -157,11 +157,11 @@ In your project's `package.json`, add requirement to `dependencies`: ### Set Up -{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L27-L30" >}} +{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L25-L28" >}} ### Tear Down -{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L32-33" >}} +{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L30-31" >}} {{% /tab %}} {{< tab header="CSharp" >}}