@@ -757,7 +757,7 @@ def activate_jquery(self):
757
757
except Exception :
758
758
# jQuery is not currently defined. Let's proceed by defining it.
759
759
pass
760
- jquery_js = "https://code.jquery.com/jquery-3.2.1.min.js"
760
+ jquery_js = constants . JQuery . MIN_JS
761
761
self .add_js_link (jquery_js )
762
762
for x in range (int (settings .MINI_TIMEOUT * 10.0 )):
763
763
# jQuery needs a small amount of time to activate.
@@ -777,12 +777,8 @@ def __activate_bootstrap(self):
777
777
http://bootstraptour.com/
778
778
(Currently, SeleniumBase methods only use Shepherd Tours.)
779
779
"""
780
- bootstrap_tour_css = ("https://cdnjs.cloudflare.com/ajax/libs"
781
- "/bootstrap-tour/0.11.0/css"
782
- "/bootstrap-tour-standalone.min.css" )
783
- bootstrap_tour_js = ("https://cdnjs.cloudflare.com/ajax/libs"
784
- "/bootstrap-tour/0.11.0/js"
785
- "/bootstrap-tour-standalone.min.js" )
780
+ bootstrap_tour_css = constants .BootstrapTour .MIN_CSS
781
+ bootstrap_tour_js = constants .BootstrapTour .MIN_JS
786
782
787
783
verify_script = ("""// Instance the tour
788
784
var tour = new Tour({
@@ -822,31 +818,17 @@ def __activate_shepherd(self):
822
818
""" Allows you to use Shepherd Tours with SeleniumBase
823
819
http://github.hubspot.com/shepherd/docs/welcome/
824
820
"""
825
- sh_theme_arrows_css = ("https://cdnjs.cloudflare.com/ajax/libs"
826
- "/shepherd/1.8.1/css/shepherd-theme-arrows.css" )
827
- sh_theme_arrows_fix_css = ("https://cdnjs.cloudflare.com/ajax/libs"
828
- "/shepherd/1.8.1/css"
829
- "/shepherd-theme-arrows-fix.css" )
830
- sh_theme_default_css = ("https://cdnjs.cloudflare.com/ajax/libs"
831
- "/shepherd/1.8.1/css"
832
- "/shepherd-theme-default.css" )
833
- sh_theme_dark_css = ("https://cdnjs.cloudflare.com/ajax/libs"
834
- "/shepherd/1.8.1/css/shepherd-theme-dark.css" )
835
- sh_theme_sq_css = ("https://cdnjs.cloudflare.com/ajax/libs/"
836
- "shepherd/1.8.1/css/shepherd-theme-square.css" )
837
- sh_theme_sq_dark_css = ("https://cdnjs.cloudflare.com/ajax/libs"
838
- "/shepherd/1.8.1/css/"
839
- "shepherd-theme-square-dark.css" )
840
- tether_js = ("https://cdnjs.cloudflare.com/ajax/libs"
841
- "/tether/1.4.4/js/tether.min.js" )
842
- shepherd_js = ("https://cdnjs.cloudflare.com/ajax/libs"
843
- "/shepherd/1.8.1/js/shepherd.min.js" )
844
- underscore_js = ("https://cdnjs.cloudflare.com/ajax/libs"
845
- "/underscore.js/1.4.3/underscore-min.js" )
846
- backbone_js = ("https://cdnjs.cloudflare.com/ajax/libs"
847
- "/backbone.js/0.9.10/backbone-min.js" )
848
- spinner_css = ("https://cdnjs.cloudflare.com/ajax/libs"
849
- "/messenger/1.5.0/css/messenger-spinner.css" )
821
+ shepherd_js = constants .Shepherd .MIN_JS
822
+ sh_theme_arrows_css = constants .Shepherd .THEME_ARROWS_CSS
823
+ sh_theme_arrows_fix_css = constants .Shepherd .THEME_ARR_FIX_CSS
824
+ sh_theme_default_css = constants .Shepherd .THEME_DEFAULT_CSS
825
+ sh_theme_dark_css = constants .Shepherd .THEME_DARK_CSS
826
+ sh_theme_sq_css = constants .Shepherd .THEME_SQ_CSS
827
+ sh_theme_sq_dark_css = constants .Shepherd .THEME_SQ_DK_CSS
828
+ tether_js = constants .Tether .MIN_JS
829
+ underscore_js = constants .Underscore .MIN_JS
830
+ backbone_js = constants .Backbone .MIN_JS
831
+ spinner_css = constants .Messenger .SPINNER_CSS
850
832
851
833
backdrop_style = (
852
834
'''
@@ -1179,33 +1161,19 @@ def __wait_for_css_query_selector(
1179
1161
selector , timeout ))
1180
1162
1181
1163
def activate_messenger (self ):
1182
- jquery_js = "https://code.jquery.com/jquery-3.2.1.min.js"
1183
- messenger_js = ("https://cdnjs.cloudflare.com/ajax/libs"
1184
- "/messenger/1.5.0/js/messenger.min.js" )
1185
- msgr_theme_flat_js = ("https://cdnjs.cloudflare.com/ajax/libs"
1186
- "/messenger/1.5.0/js/messenger-theme-flat.js" )
1187
- msg_theme_future_js = ("https://cdnjs.cloudflare.com/ajax/libs"
1188
- "/messenger/1.5.0/js/messenger-theme-future.js" )
1189
- underscore_js = ("https://cdnjs.cloudflare.com/ajax/libs"
1190
- "/underscore.js/1.4.3/underscore-min.js" )
1191
- backbone_js = ("https://cdnjs.cloudflare.com/ajax/libs"
1192
- "/backbone.js/0.9.10/backbone-min.js" )
1193
- spinner_css = ("https://cdnjs.cloudflare.com/ajax/libs"
1194
- "/messenger/1.5.0/css/messenger-spinner.css" )
1195
- messenger_css = ("https://cdnjs.cloudflare.com/ajax/libs"
1196
- "/messenger/1.5.0/css/messenger.css" )
1197
- msgr_theme_flat_css = ("https://cdnjs.cloudflare.com/ajax/libs"
1198
- "/messenger/1.5.0/css/messenger-theme-flat.css" )
1199
- msgr_theme_future_css = ("https://cdnjs.cloudflare.com/ajax/libs"
1200
- "/messenger/1.5.0/css/"
1201
- "messenger-theme-future.css" )
1202
- msgr_theme_block_css = ("https://cdnjs.cloudflare.com/ajax/libs"
1203
- "/messenger/1.5.0/css/"
1204
- "messenger-theme-block.css" )
1205
- msgr_theme_air_css = ("https://cdnjs.cloudflare.com/ajax/libs"
1206
- "/messenger/1.5.0/css/messenger-theme-air.css" )
1207
- msgr_theme_ice_css = ("https://cdnjs.cloudflare.com/ajax/libs"
1208
- "/messenger/1.5.0/css/messenger-theme-ice.css" )
1164
+ jquery_js = constants .JQuery .MIN_JS
1165
+ messenger_css = constants .Messenger .MIN_CSS
1166
+ messenger_js = constants .Messenger .MIN_JS
1167
+ msgr_theme_flat_js = constants .Messenger .THEME_FLAT_JS
1168
+ msgr_theme_future_js = constants .Messenger .THEME_FUTURE_JS
1169
+ msgr_theme_flat_css = constants .Messenger .THEME_FLAT_CSS
1170
+ msgr_theme_future_css = constants .Messenger .THEME_FUTURE_CSS
1171
+ msgr_theme_block_css = constants .Messenger .THEME_BLOCK_CSS
1172
+ msgr_theme_air_css = constants .Messenger .THEME_AIR_CSS
1173
+ msgr_theme_ice_css = constants .Messenger .THEME_ICE_CSS
1174
+ spinner_css = constants .Messenger .SPINNER_CSS
1175
+ underscore_js = constants .Underscore .MIN_JS
1176
+ backbone_js = constants .Backbone .MIN_JS
1209
1177
1210
1178
msg_style = ("Messenger.options = {'maxMessages': 8, "
1211
1179
"extraClasses: 'messenger-fixed "
@@ -1224,7 +1192,7 @@ def activate_messenger(self):
1224
1192
self .add_css_link (spinner_css )
1225
1193
self .add_js_link (messenger_js )
1226
1194
self .add_js_link (msgr_theme_flat_js )
1227
- self .add_js_link (msg_theme_future_js )
1195
+ self .add_js_link (msgr_theme_future_js )
1228
1196
1229
1197
for x in range (int (settings .MINI_TIMEOUT * 10.0 )):
1230
1198
# Messenger needs a small amount of time to load & activate.
0 commit comments