@@ -1497,12 +1497,6 @@ def slow_scroll_to(self, selector, by=By.CSS_SELECTOR,
1497
1497
selector , by = by , timeout = timeout )
1498
1498
self .__slow_scroll_to_element (element )
1499
1499
1500
- @decorators .deprecated ("Use self.click() - It now scrolls before clicking" )
1501
- def scroll_click (self , selector , by = By .CSS_SELECTOR ):
1502
- # DEPRECATED - self.click() now scrolls to the element before clicking
1503
- # self.scroll_to(selector, by=by) # Redundant
1504
- self .click (selector , by = by )
1505
-
1506
1500
def click_xpath (self , xpath ):
1507
1501
# Technically self.click() will automatically detect an xpath selector,
1508
1502
# so self.click_xpath() is just a longer name for the same action.
@@ -1614,11 +1608,6 @@ def ad_block(self):
1614
1608
except Exception :
1615
1609
pass # Don't fail test if ad_blocking fails
1616
1610
1617
- @decorators .deprecated ("Use re.escape() instead! It does what you want!" )
1618
- def jq_format (self , code ):
1619
- # DEPRECATED - re.escape() already does that thing you want!
1620
- return js_utils ._jq_format (code )
1621
-
1622
1611
def get_domain_url (self , url ):
1623
1612
return page_utils .get_domain_url (url )
1624
1613
@@ -1893,8 +1882,8 @@ def js_update_text(self, selector, new_value, by=By.CSS_SELECTOR,
1893
1882
self .set_value (
1894
1883
selector , new_value , by = by , timeout = timeout )
1895
1884
1896
- def jquery_update_text_value (self , selector , new_value , by = By .CSS_SELECTOR ,
1897
- timeout = settings .LARGE_TIMEOUT ):
1885
+ def jquery_update_text (self , selector , new_value , by = By .CSS_SELECTOR ,
1886
+ timeout = settings .LARGE_TIMEOUT ):
1898
1887
""" This method uses jQuery to update a text field.
1899
1888
If the new_value string ends with the newline character,
1900
1889
WebDriver will finish the call, which simulates pressing
@@ -1919,15 +1908,6 @@ def jquery_update_text_value(self, selector, new_value, by=By.CSS_SELECTOR,
1919
1908
element .send_keys ('\n ' )
1920
1909
self .__demo_mode_pause_if_active ()
1921
1910
1922
- def jquery_update_text (self , selector , new_value , by = By .CSS_SELECTOR ,
1923
- timeout = settings .LARGE_TIMEOUT ):
1924
- """ The shorter version of self.jquery_update_text_value()
1925
- (The longer version remains for backwards compatibility.) """
1926
- if self .timeout_multiplier and timeout == settings .LARGE_TIMEOUT :
1927
- timeout = self .__get_new_timeout (timeout )
1928
- self .jquery_update_text_value (
1929
- selector , new_value , by = by , timeout = timeout )
1930
-
1931
1911
def hover_on_element (self , selector , by = By .CSS_SELECTOR ):
1932
1912
if page_utils .is_xpath_selector (selector ):
1933
1913
selector = self .convert_to_css_selector (selector , By .XPATH )
@@ -3086,6 +3066,44 @@ def __highlight_with_jquery_2(self, message, selector, o_bs):
3086
3066
3087
3067
############
3088
3068
3069
+ # Deprecated Methods (Replace these if they're still in your code!)
3070
+
3071
+ @decorators .deprecated (
3072
+ "scroll_click() is deprecated. Use self.click() - It scrolls for you!" )
3073
+ def scroll_click (self , selector , by = By .CSS_SELECTOR ):
3074
+ # DEPRECATED - self.click() now scrolls to the element before clicking.
3075
+ # self.scroll_to(selector, by=by) # Redundant
3076
+ self .click (selector , by = by )
3077
+
3078
+ @decorators .deprecated (
3079
+ "update_text_value() is deprecated. Use self.update_text() instead!" )
3080
+ def update_text_value (self , selector , new_value , by = By .CSS_SELECTOR ,
3081
+ timeout = settings .LARGE_TIMEOUT , retry = False ):
3082
+ # DEPRECATED - self.update_text() should be used instead.
3083
+ if self .timeout_multiplier and timeout == settings .LARGE_TIMEOUT :
3084
+ timeout = self .__get_new_timeout (timeout )
3085
+ if page_utils .is_xpath_selector (selector ):
3086
+ by = By .XPATH
3087
+ self .update_text (
3088
+ selector , new_value , by = by , timeout = timeout , retry = retry )
3089
+
3090
+ @decorators .deprecated (
3091
+ "jquery_update_text_value() is deprecated. Use jquery_update_text()" )
3092
+ def jquery_update_text_value (self , selector , new_value , by = By .CSS_SELECTOR ,
3093
+ timeout = settings .LARGE_TIMEOUT ):
3094
+ # DEPRECATED - self.jquery_update_text() should be used instead.
3095
+ if self .timeout_multiplier and timeout == settings .LARGE_TIMEOUT :
3096
+ timeout = self .__get_new_timeout (timeout )
3097
+ self .jquery_update_text (selector , new_value , by = by , timeout = timeout )
3098
+
3099
+ @decorators .deprecated (
3100
+ "jq_format() is deprecated. Use re.escape() instead!" )
3101
+ def jq_format (self , code ):
3102
+ # DEPRECATED - re.escape() already performs the intended action!
3103
+ return js_utils ._jq_format (code )
3104
+
3105
+ ############
3106
+
3089
3107
def setUp (self , masterqa_mode = False ):
3090
3108
"""
3091
3109
Be careful if a subclass of BaseCase overrides setUp()
0 commit comments