@@ -2943,6 +2943,20 @@ def click_link(self, link_text, timeout=None):
2943
2943
timeout = self .__get_new_timeout (timeout )
2944
2944
self .click_link_text (link_text , timeout = timeout )
2945
2945
2946
+ def wait_for_element_visible (self , selector , by = By .CSS_SELECTOR ,
2947
+ timeout = None ):
2948
+ """ Same as self.wait_for_element() """
2949
+ if not timeout :
2950
+ timeout = settings .LARGE_TIMEOUT
2951
+ if self .timeout_multiplier and timeout == settings .LARGE_TIMEOUT :
2952
+ timeout = self .__get_new_timeout (timeout )
2953
+ selector , by = self .__recalculate_selector (selector , by )
2954
+ return page_actions .wait_for_element_visible (
2955
+ self .driver , selector , by , timeout )
2956
+
2957
+ def print (self , * args , ** kwargs ):
2958
+ print (* args , ** kwargs )
2959
+
2946
2960
def start_tour (self , name = None , interval = 0 ):
2947
2961
self .play_tour (name = name , interval = interval )
2948
2962
@@ -3559,8 +3573,7 @@ def wait_for_element_present(self, selector, by=By.CSS_SELECTOR,
3559
3573
return page_actions .wait_for_element_present (
3560
3574
self .driver , selector , by , timeout )
3561
3575
3562
- def wait_for_element_visible (self , selector , by = By .CSS_SELECTOR ,
3563
- timeout = None ):
3576
+ def wait_for_element (self , selector , by = By .CSS_SELECTOR , timeout = None ):
3564
3577
""" Waits for an element to appear in the HTML of a page.
3565
3578
The element must be visible (it cannot be hidden). """
3566
3579
if not timeout :
@@ -3571,14 +3584,6 @@ def wait_for_element_visible(self, selector, by=By.CSS_SELECTOR,
3571
3584
return page_actions .wait_for_element_visible (
3572
3585
self .driver , selector , by , timeout )
3573
3586
3574
- def wait_for_element (self , selector , by = By .CSS_SELECTOR , timeout = None ):
3575
- """ The shorter version of wait_for_element_visible() """
3576
- if not timeout :
3577
- timeout = settings .LARGE_TIMEOUT
3578
- if self .timeout_multiplier and timeout == settings .LARGE_TIMEOUT :
3579
- timeout = self .__get_new_timeout (timeout )
3580
- return self .wait_for_element_visible (selector , by = by , timeout = timeout )
3581
-
3582
3587
def get_element (self , selector , by = By .CSS_SELECTOR , timeout = None ):
3583
3588
""" Same as wait_for_element_present() - returns the element.
3584
3589
The element does not need be visible (it may be hidden). """
0 commit comments