Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Setup and Teardown Python Examples to Organizing and Executing Selenium Code #1868

Merged
merged 3 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions examples/python/tests/getting_started/using_selenium_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ def test_eight_components():
assert value == "Received!"

driver.quit()

def setup():
driver = webdriver.Chrome()
driver.get("https://www.selenium.dev/selenium/web/web-form.html")
return driver

def teardown(driver):
driver.quit()
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,15 @@ In your project's `package.json`, add requirement to `dependencies`:

{{% /tab %}}
{{% tab header="Python" %}}

### Set Up

{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L27-L30" >}}

### Tear Down

{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L32-33" >}}

{{< badge-code >}}
{{% /tab %}}
{{< tab header="CSharp" >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,15 @@ In your project's `package.json`, add requirement to `dependencies`:

{{% /tab %}}
{{% tab header="Python" %}}

### Set Up

{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L27-L30" >}}

### Tear Down

{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L32-33" >}}

{{< badge-code >}}
{{% /tab %}}
{{< tab header="CSharp" >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,15 @@ In your project's `package.json`, adicionar requisito às `dependências`:

{{% /tab %}}
{{% tab header="Python" %}}

### Set Up

{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L27-L30" >}}

### Tear Down

{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L32-33" >}}

{{< badge-code >}}
{{% /tab %}}
{{< tab header="CSharp" >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ In your project's `package.json`, add requirement to `dependencies`:

{{% /tab %}}
{{% tab header="Python" %}}

### Set Up

{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L27-L30" >}}

### Tear Down

{{< gh-codeblock path="examples/python/tests/getting_started/using_selenium_tests.py#L32-33" >}}

{{< badge-code >}}
{{% /tab %}}
{{< tab header="CSharp" >}}
Expand Down
Loading