File tree Expand file tree Collapse file tree 5 files changed +31
-17
lines changed 
examples/python/tests/support 
website_and_docs/content/documentation/webdriver/support_features Expand file tree Collapse file tree 5 files changed +31
-17
lines changed Original file line number Diff line number Diff line change 1- from   selenium   import  webdriver 
1+ import  pytest 
22
3+ from  selenium .webdriver .common .by  import  By 
4+ from  selenium .webdriver .support  import  expected_conditions  as  EC 
5+ from  selenium .webdriver .support .wait  import  WebDriverWait 
6+ 
7+ # Expected Conditions API Documentation: 
8+ # https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html 
9+ 
10+ 
11+ def  test_expected_condition (driver ):
12+     driver .get ("https://www.selenium.dev/selenium/web/dynamic.html" )
13+     revealed  =  driver .find_element (By .ID , "revealed" )
14+     driver .find_element (By .ID , "reveal" ).click ()
15+ 
16+     wait  =  WebDriverWait (driver , timeout = 2 )
17+     wait .until (EC .visibility_of_element_located ((By .ID , "revealed" )))
18+ 
19+     revealed .send_keys ("Displayed" )
20+     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#L16-L17" >}}
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#L16-L17" >}}
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#L16-L17" >}}
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#L16-L17" >}}
29+ {{% /tab %}}
3130{{< tab header="CSharp" >}}
3231.NET stopped supporting Expected Conditions in Selenium 4 to minimize maintenance hassle and redundancy.
3332{{< /tab >}}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments