@@ -633,7 +633,7 @@ def is_partial_link_text_visible(self, partial_link_text):
633
633
return page_actions .is_element_visible (self .driver , partial_link_text ,
634
634
by = By .PARTIAL_LINK_TEXT )
635
635
636
- def is_text_visible (self , text , selector , by = By .CSS_SELECTOR ):
636
+ def is_text_visible (self , text , selector = "html" , by = By .CSS_SELECTOR ):
637
637
self .wait_for_ready_state_complete ()
638
638
time .sleep (0.01 )
639
639
if page_utils .is_xpath_selector (selector ):
@@ -1946,7 +1946,7 @@ def assert_element(self, selector, by=By.CSS_SELECTOR,
1946
1946
# with the exception of assert_*, which won't return the element,
1947
1947
# but like the others, will raise an exception if the call fails.
1948
1948
1949
- def wait_for_text_visible (self , text , selector , by = By .CSS_SELECTOR ,
1949
+ def wait_for_text_visible (self , text , selector = "html" , by = By .CSS_SELECTOR ,
1950
1950
timeout = settings .LARGE_TIMEOUT ):
1951
1951
if self .timeout_multiplier and timeout == settings .LARGE_TIMEOUT :
1952
1952
timeout = self .__get_new_timeout (timeout )
@@ -1958,30 +1958,30 @@ def wait_for_text_visible(self, text, selector, by=By.CSS_SELECTOR,
1958
1958
return page_actions .wait_for_text_visible (
1959
1959
self .driver , text , selector , by , timeout )
1960
1960
1961
- def wait_for_text (self , text , selector , by = By .CSS_SELECTOR ,
1961
+ def wait_for_text (self , text , selector = "html" , by = By .CSS_SELECTOR ,
1962
1962
timeout = settings .LARGE_TIMEOUT ):
1963
1963
""" The shorter version of wait_for_text_visible() """
1964
1964
if self .timeout_multiplier and timeout == settings .LARGE_TIMEOUT :
1965
1965
timeout = self .__get_new_timeout (timeout )
1966
1966
return self .wait_for_text_visible (
1967
1967
text , selector , by = by , timeout = timeout )
1968
1968
1969
- def find_text (self , text , selector , by = By .CSS_SELECTOR ,
1969
+ def find_text (self , text , selector = "html" , by = By .CSS_SELECTOR ,
1970
1970
timeout = settings .LARGE_TIMEOUT ):
1971
1971
""" Same as wait_for_text_visible() - returns the element """
1972
1972
if self .timeout_multiplier and timeout == settings .LARGE_TIMEOUT :
1973
1973
timeout = self .__get_new_timeout (timeout )
1974
1974
return self .wait_for_text_visible (
1975
1975
text , selector , by = by , timeout = timeout )
1976
1976
1977
- def assert_text_visible (self , text , selector , by = By .CSS_SELECTOR ,
1977
+ def assert_text_visible (self , text , selector = "html" , by = By .CSS_SELECTOR ,
1978
1978
timeout = settings .SMALL_TIMEOUT ):
1979
1979
""" Same as assert_text() """
1980
1980
if self .timeout_multiplier and timeout == settings .SMALL_TIMEOUT :
1981
1981
timeout = self .__get_new_timeout (timeout )
1982
1982
return self .assert_text (text , selector , by = by , timeout = timeout )
1983
1983
1984
- def assert_text (self , text , selector , by = By .CSS_SELECTOR ,
1984
+ def assert_text (self , text , selector = "html" , by = By .CSS_SELECTOR ,
1985
1985
timeout = settings .SMALL_TIMEOUT ):
1986
1986
""" Similar to wait_for_text_visible()
1987
1987
Raises an exception if the element or the text is not found.
@@ -2378,7 +2378,7 @@ def check_assert_element(self, selector, by=By.CSS_SELECTOR,
2378
2378
""" DEPRECATED - Use self.delayed_assert_element() instead. """
2379
2379
return self .delayed_assert_element (selector , by = by , timeout = timeout )
2380
2380
2381
- def delayed_assert_text (self , text , selector , by = By .CSS_SELECTOR ,
2381
+ def delayed_assert_text (self , text , selector = "html" , by = By .CSS_SELECTOR ,
2382
2382
timeout = settings .MINI_TIMEOUT ):
2383
2383
""" A non-terminating assertion for text from an element on a page.
2384
2384
Failures will be saved until the process_delayed_asserts()
@@ -2400,7 +2400,7 @@ def delayed_assert_text(self, text, selector, by=By.CSS_SELECTOR,
2400
2400
return False
2401
2401
2402
2402
@decorators .deprecated ("Use self.delayed_assert_text() instead!" )
2403
- def check_assert_text (self , text , selector , by = By .CSS_SELECTOR ,
2403
+ def check_assert_text (self , text , selector = "html" , by = By .CSS_SELECTOR ,
2404
2404
timeout = settings .MINI_TIMEOUT ):
2405
2405
""" DEPRECATED - Use self.delayed_assert_text() instead. """
2406
2406
return self .delayed_assert_text (text , selector , by = by , timeout = timeout )
0 commit comments