File tree Expand file tree Collapse file tree 6 files changed +31
-19
lines changed
examples/python/tests/support
content/documentation/webdriver/support_features Expand file tree Collapse file tree 6 files changed +31
-19
lines changed Original file line number Diff line number Diff line change 1- from selenium import webdriver
1+ from selenium .webdriver .common .by import By
2+ from selenium .webdriver .support import expected_conditions as EC
3+ from selenium .webdriver .support .wait import WebDriverWait
24
5+ # Expected Conditions API Documentation:
6+ # https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html
7+
8+
9+ def test_expected_condition (driver ):
10+ driver .get ("https://www.selenium.dev/selenium/web/dynamic.html" )
11+ revealed = driver .find_element (By .ID , "revealed" )
12+ driver .find_element (By .ID , "reveal" ).click ()
13+
14+ wait = WebDriverWait (driver , timeout = 2 )
15+ wait .until (EC .visibility_of_element_located ((By .ID , "revealed" )))
16+
17+ revealed .send_keys ("Displayed" )
18+ assert revealed .get_property ("value" ) == "Displayed"
Original file line number Diff line number Diff line change @@ -24,10 +24,9 @@ These methods can include conditions such as:
2424[ Expected Conditions Documentation] ( https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/support/ui/ExpectedConditions.html )
2525{{< badge-code >}}
2626{{% /tab %}}
27- {{< tab header="Python" >}}
28- [ Expected Conditions Documentation] ( https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html )
29- {{< badge-code >}}
30- {{< /tab >}}
27+ {{% tab header="Python" %}}
28+ {{< gh-codeblock path="examples/python/tests/support/test_expected_conditions.py#L14-L15" >}}
29+ {{% /tab %}}
3130{{< tab header="CSharp" >}}
3231.NET stopped supporting Expected Conditions in Selenium 4 to minimize maintenance hassle and redundancy.
3332{{< /tab >}}
Original file line number Diff line number Diff line change @@ -24,10 +24,9 @@ These methods can include conditions such as:
2424[ Expected Conditions Documentation] ( https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/support/ui/ExpectedConditions.html )
2525{{< badge-code >}}
2626{{% /tab %}}
27- {{< tab header="Python" >}}
28- [ Expected Conditions Documentation] ( https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html )
29- {{< badge-code >}}
30- {{< /tab >}}
27+ {{% tab header="Python" %}}
28+ {{< gh-codeblock path="examples/python/tests/support/test_expected_conditions.py#L14-L15" >}}
29+ {{% /tab %}}
3130{{< tab header="CSharp" >}}
3231.NET stopped supporting Expected Conditions in Selenium 4 to minimize maintenance hassle and redundancy.
3332{{< /tab >}}
Original file line number Diff line number Diff line change @@ -24,10 +24,9 @@ These methods can include conditions such as:
2424[ Expected Conditions Documentation] ( https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/support/ui/ExpectedConditions.html )
2525{{< badge-code >}}
2626{{% /tab %}}
27- {{< tab header="Python" >}}
28- [ Expected Conditions Documentation] ( https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html )
29- {{< badge-code >}}
30- {{< /tab >}}
27+ {{% tab header="Python" %}}
28+ {{< gh-codeblock path="examples/python/tests/support/test_expected_conditions.py#L14-L15" >}}
29+ {{% /tab %}}
3130{{< tab header="CSharp" >}}
3231.NET stopped supporting Expected Conditions in Selenium 4 to minimize maintenance hassle and redundancy.
3332{{< /tab >}}
Original file line number Diff line number Diff line change @@ -24,10 +24,9 @@ description: >
2424[ Expected Conditions Documentation] ( https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/support/ui/ExpectedConditions.html )
2525{{< badge-code >}}
2626{{% /tab %}}
27- {{< tab header="Python" >}}
28- [ Expected Conditions Documentation] ( https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html )
29- {{< badge-code >}}
30- {{< /tab >}}
27+ {{% tab header="Python" %}}
28+ {{< gh-codeblock path="examples/python/tests/support/test_expected_conditions.py#L14-L15" >}}
29+ {{% /tab %}}
3130{{< tab header="CSharp" >}}
3231.NET stopped supporting Expected Conditions in Selenium 4 to minimize maintenance hassle and redundancy.
3332{{< /tab >}}
Original file line number Diff line number Diff line change @@ -164,8 +164,8 @@ plausible_analytics = true
164164prism_syntax_highlighting = true
165165
166166# Enable announcement banner below navbar (Go to announcement-banner.html to change the message)
167- banner_flag = true
168- announcement_banner = true
167+ banner_flag = false
168+ announcement_banner = false
169169
170170# Enable Algolia DocSearch
171171[params .search .algolia ]
You can’t perform that action at this time.
0 commit comments