|
15 | 15 | EXPORTED_TOURS_FOLDER = "tours_exported"
|
16 | 16 |
|
17 | 17 |
|
18 |
| -def raise_unable_to_load_jquery_exception(driver): |
19 |
| - """ The most-likely reason for jQuery not loading on web pages. """ |
20 |
| - raise Exception( |
21 |
| - '''Unable to load jQuery on "%s" due to a possible violation ''' |
22 |
| - '''of the website's Content Security Policy ''' |
23 |
| - '''directive. ''' % driver.current_url) |
24 |
| - |
25 |
| - |
26 | 18 | def activate_bootstrap(driver):
|
27 | 19 | """ Allows you to use Bootstrap Tours with SeleniumBase
|
28 | 20 | http://bootstraptour.com/
|
@@ -51,7 +43,7 @@ def activate_bootstrap(driver):
|
51 | 43 | return
|
52 | 44 | except Exception:
|
53 | 45 | time.sleep(0.15)
|
54 |
| - raise_unable_to_load_jquery_exception(driver) |
| 46 | + js_utils.raise_unable_to_load_jquery_exception(driver) |
55 | 47 |
|
56 | 48 |
|
57 | 49 | def is_bootstrap_activated(driver):
|
@@ -96,7 +88,7 @@ def activate_hopscotch(driver):
|
96 | 88 | return
|
97 | 89 | except Exception:
|
98 | 90 | time.sleep(0.15)
|
99 |
| - raise_unable_to_load_jquery_exception(driver) |
| 91 | + js_utils.raise_unable_to_load_jquery_exception(driver) |
100 | 92 |
|
101 | 93 |
|
102 | 94 | def is_hopscotch_activated(driver):
|
@@ -139,7 +131,7 @@ def activate_introjs(driver):
|
139 | 131 | return
|
140 | 132 | except Exception:
|
141 | 133 | time.sleep(0.15)
|
142 |
| - raise_unable_to_load_jquery_exception(driver) |
| 134 | + js_utils.raise_unable_to_load_jquery_exception(driver) |
143 | 135 |
|
144 | 136 |
|
145 | 137 | def is_introjs_activated(driver):
|
@@ -199,7 +191,7 @@ def activate_shepherd(driver):
|
199 | 191 | return
|
200 | 192 | except Exception:
|
201 | 193 | time.sleep(0.15)
|
202 |
| - raise_unable_to_load_jquery_exception(driver) |
| 194 | + js_utils.raise_unable_to_load_jquery_exception(driver) |
203 | 195 |
|
204 | 196 |
|
205 | 197 | def is_shepherd_activated(driver):
|
|
0 commit comments