@@ -21,125 +21,133 @@ self.double_click(selector, by=By.CSS_SELECTOR, timeout=settings.SMALL_TIMEOUT)
21
21
22
22
self .click_chain(selectors_list, by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT , spacing = 0 )
23
23
24
- self .is_link_text_present(link_text )
24
+ self .type(selector, text, by = By. CSS_SELECTOR , timeout = settings. SMALL_TIMEOUT , retry = False )
25
25
26
- self .is_partial_link_text_present(link_text )
26
+ self .update_text(selector, new_value, by = By. CSS_SELECTOR , timeout = settings. SMALL_TIMEOUT , retry = False )
27
27
28
- self .get_link_attribute(link_text, attribute, hard_fail )
28
+ self .add_text(selector, text, by = By. CSS_SELECTOR , timeout = settings. SMALL_TIMEOUT )
29
29
30
- self .get_partial_link_text_attribute(link_text, attribute, hard_fail )
30
+ self .send_keys(selector, text, by = By. CSS_SELECTOR , timeout = settings. SMALL_TIMEOUT )
31
31
32
- self .wait_for_link_text_present(link_text, timeout = settings. SMALL_TIMEOUT )
32
+ self .submit(selector, by = By. CSS_SELECTOR )
33
33
34
- self .wait_for_partial_link_text_present(link_text, timeout = settings. SMALL_TIMEOUT )
34
+ self .refresh_page( )
35
35
36
- self .click_link_text(link_text, timeout = settings. SMALL_TIMEOUT )
36
+ self .refresh( )
37
37
38
- self .click_link(link_text, timeout = settings. SMALL_TIMEOUT )
38
+ self .get_current_url( )
39
39
40
- self .click_partial_link_text(partial_link_text, timeout = settings. SMALL_TIMEOUT )
40
+ self .get_page_source( )
41
41
42
- self .get_text(selector, by = By. CSS_SELECTOR , timeout = settings. SMALL_TIMEOUT )
42
+ self .get_page_title( )
43
43
44
- self .get_attribute(selector, attribute, by = By. CSS_SELECTOR , timeout = settings. SMALL_TIMEOUT )
44
+ self .get_title( )
45
45
46
- self .set_attribute(selector, attribute, value, by = By. CSS_SELECTOR , timeout = settings. SMALL_TIMEOUT )
46
+ self .go_back( )
47
47
48
- self .remove_attribute(selector, attribute, by = By. CSS_SELECTOR , timeout = settings. SMALL_TIMEOUT )
48
+ self .go_forward( )
49
49
50
- self .get_property_value (selector, property , by = By.CSS_SELECTOR , timeout = settings. SMALL_TIMEOUT )
50
+ self .is_element_present (selector, by = By.CSS_SELECTOR )
51
51
52
- self .refresh_page( )
52
+ self .is_element_visible(selector, by = By. CSS_SELECTOR )
53
53
54
- self .refresh( )
54
+ self .is_text_visible(text, selector = " html " , by = By. CSS_SELECTOR )
55
55
56
- self .get_current_url( )
56
+ self .is_link_text_visible(link_text )
57
57
58
- self .get_page_source( )
58
+ self .is_partial_link_text_visible(partial_link_text )
59
59
60
- self .get_page_title( )
60
+ self .is_link_text_present(link_text )
61
61
62
- self .get_title( )
62
+ self .is_partial_link_text_present(link_text )
63
63
64
- self .go_back( )
64
+ self .get_link_attribute(link_text, attribute, hard_fail )
65
65
66
- self .go_forward( )
66
+ self .get_link_text_attribute(link_text, attribute, hard_fail )
67
67
68
- self .get_image_url(selector, by = By. CSS_SELECTOR , timeout = settings. SMALL_TIMEOUT )
68
+ self .get_partial_link_text_attribute(link_text, attribute, hard_fail )
69
69
70
- self .add_text(selector, text, by = By. CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
70
+ self .click_link_text(link_text , timeout = settings.SMALL_TIMEOUT )
71
71
72
- self .send_keys(selector, text, by = By. CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
72
+ self .click_link(link_text , timeout = settings.SMALL_TIMEOUT )
73
73
74
- self .update_text(selector, new_value, by = By. CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT , retry = False )
74
+ self .click_partial_link_text(partial_link_text, timeout = settings.SMALL_TIMEOUT )
75
75
76
- self .type (selector, text, by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT , retry = False )
76
+ self .get_text (selector, by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
77
77
78
- self .is_element_present (selector, by = By.CSS_SELECTOR )
78
+ self .get_attribute (selector, attribute, by = By.CSS_SELECTOR , timeout = settings. SMALL_TIMEOUT )
79
79
80
- self .is_element_visible (selector, by = By.CSS_SELECTOR )
80
+ self .set_attribute (selector, attribute, value, by = By.CSS_SELECTOR , timeout = settings. SMALL_TIMEOUT )
81
81
82
- self .is_link_text_visible(link_text )
82
+ self .remove_attribute(selector, attribute, by = By. CSS_SELECTOR , timeout = settings. SMALL_TIMEOUT )
83
83
84
- self .is_partial_link_text_visible(partial_link_text )
84
+ self .get_property_value(selector, property , by = By. CSS_SELECTOR , timeout = settings. SMALL_TIMEOUT )
85
85
86
- self .is_text_visible(text, selector = " html " , by = By.CSS_SELECTOR )
86
+ self .get_image_url( selector, by = By.CSS_SELECTOR , timeout = settings. SMALL_TIMEOUT )
87
87
88
88
self .find_elements(selector, by = By.CSS_SELECTOR , limit = 0 )
89
89
90
90
self .find_visible_elements(selector, by = By.CSS_SELECTOR , limit = 0 )
91
91
92
92
self .click_visible_elements(selector, by = By.CSS_SELECTOR , limit = 0 )
93
93
94
+ self .click_if_visible(selector, by = By.CSS_SELECTOR )
95
+
94
96
self .is_element_in_an_iframe(selector, by = By.CSS_SELECTOR )
95
97
96
98
self .switch_to_frame_of_element(selector, by = By.CSS_SELECTOR )
97
99
98
- self .execute_script(script )
100
+ self .hover_on_element(selector, by = By. CSS_SELECTOR )
99
101
100
- self .set_window_size(width, height)
102
+ self .hover_and_click(hover_selector, click_selector,
103
+ hover_by = By.CSS_SELECTOR , click_by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
101
104
102
- self .maximize_window()
105
+ self .hover_and_double_click(hover_selector, click_selector,
106
+ hover_by = By.CSS_SELECTOR , click_by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
103
107
104
- self .add_css_link(css_link)
108
+ self .select_option_by_text(dropdown_selector, option,
109
+ dropdown_by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
105
110
106
- self .add_js_link(js_link)
111
+ self .select_option_by_index(dropdown_selector, option,
112
+ dropdown_by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
107
113
108
- self .add_css_style(css_style)
114
+ self .select_option_by_value(dropdown_selector, option,
115
+ dropdown_by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
109
116
110
- self .add_js_code_from_link(js_link )
117
+ self .execute_script(script )
111
118
112
- self .add_meta_tag( http_equiv = None , content = None )
119
+ self .execute_async_script(script, timeout = settings. EXTREME_TIMEOUT )
113
120
114
- self .activate_jquery( )
121
+ self .safe_execute_script(script )
115
122
116
- self .create_tour( name = None , theme = None )
123
+ self .set_window_size(width, height )
117
124
118
- self .create_shepherd_tour( name = None , theme = None )
125
+ self .maximize_window( )
119
126
120
- self .create_bootstrap_tour( name = None )
127
+ self .switch_to_frame(frame, timeout = settings. SMALL_TIMEOUT )
121
128
122
- self .create_hopscotch_tour( name = None )
129
+ self .switch_to_default_content( )
123
130
124
- self .create_introjs_tour( name = None )
131
+ self .open_new_window( switch_to = True )
125
132
126
- self .add_tour_step(message, selector = None , name = None , title = None , theme = None , alignment = None )
133
+ self .switch_to_window(window, timeout = settings. SMALL_TIMEOUT )
127
134
128
- self .play_tour( name = None )
135
+ self .switch_to_default_window( )
129
136
130
- self .export_tour(name = None , filename = " my_tour.js" , url = None )
137
+ self .get_new_driver(browser = None , headless = None , servername = None , port = None ,
138
+ proxy = None , switch_to = True , cap_file = None )
131
139
132
- self .activate_jquery_confirm( )
140
+ self .switch_to_driver(driver )
133
141
134
- self .activate_messenger ()
142
+ self .switch_to_default_driver ()
135
143
136
- self .post_message(message, duration = None , pause = True , style = " info " )
144
+ self .save_screenshot(name, folder = None )
137
145
138
- self .post_success_message(message, duration = None , pause = True )
146
+ self .wait_for_ready_state_complete( timeout = settings. EXTREME_TIMEOUT )
139
147
140
- self .post_error_message(message, duration = None , pause = True )
148
+ self .wait_for_angularjs( timeout = settings. LARGE_TIMEOUT )
141
149
142
- self .set_messenger_theme( theme = " default " , location = " default " , max_messages = " default " )
150
+ self .activate_jquery( )
143
151
144
152
self .bring_to_front(selector, by = By.CSS_SELECTOR )
145
153
@@ -155,8 +163,6 @@ self.js_click(selector, by=By.CSS_SELECTOR)
155
163
156
164
self .jquery_click(selector, by = By.CSS_SELECTOR )
157
165
158
- self .submit(selector, by = By.CSS_SELECTOR )
159
-
160
166
self .hide_element(selector, by = By.CSS_SELECTOR )
161
167
162
168
self .hide_elements(selector, by = By.CSS_SELECTOR )
@@ -185,8 +191,6 @@ self.assert_no_404_errors(multithreaded=True)
185
191
186
192
self .print_unique_links_with_status_codes()
187
193
188
- self .safe_execute_script(script)
189
-
190
194
self .create_folder(folder)
191
195
192
196
self .choose_file(selector, file_path, by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
@@ -231,22 +235,47 @@ self.js_update_text(selector, new_value, by=By.CSS_SELECTOR, timeout=settings.LA
231
235
232
236
self .jquery_update_text(selector, new_value, by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
233
237
234
- self .hover_on_element(selector, by = By. CSS_SELECTOR )
238
+ # #######
235
239
236
- self .hover_and_click(hover_selector, click_selector,
237
- hover_by = By.CSS_SELECTOR , click_by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
240
+ self .add_css_link(css_link)
238
241
239
- self .hover_and_double_click(hover_selector, click_selector,
240
- hover_by = By.CSS_SELECTOR , click_by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
242
+ self .add_js_link(js_link)
241
243
242
- self .select_option_by_text(dropdown_selector, option,
243
- dropdown_by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
244
+ self .add_css_style(css_style)
244
245
245
- self .select_option_by_index(dropdown_selector, option,
246
- dropdown_by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
246
+ self .add_js_code_from_link(js_link)
247
247
248
- self .select_option_by_value(dropdown_selector, option,
249
- dropdown_by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
248
+ self .add_meta_tag(http_equiv = None , content = None )
249
+
250
+ # #######
251
+
252
+ self .create_tour(name = None , theme = None )
253
+
254
+ self .create_shepherd_tour(name = None , theme = None )
255
+
256
+ self .create_bootstrap_tour(name = None )
257
+
258
+ self .create_hopscotch_tour(name = None )
259
+
260
+ self .create_introjs_tour(name = None )
261
+
262
+ self .add_tour_step(message, selector = None , name = None , title = None , theme = None , alignment = None )
263
+
264
+ self .play_tour(name = None )
265
+
266
+ self .export_tour(name = None , filename = " my_tour.js" , url = None )
267
+
268
+ self .activate_jquery_confirm()
269
+
270
+ self .activate_messenger()
271
+
272
+ self .post_message(message, duration = None , pause = True , style = " info" )
273
+
274
+ self .post_success_message(message, duration = None , pause = True )
275
+
276
+ self .post_error_message(message, duration = None , pause = True )
277
+
278
+ self .set_messenger_theme(theme = " default" , location = " default" , max_messages = " default" )
250
279
251
280
# #######
252
281
@@ -262,16 +291,14 @@ self.generate_traffic_chain(pages, loops=1)
262
291
263
292
self .wait_for_element_present(selector, by = By.CSS_SELECTOR , timeout = settings.LARGE_TIMEOUT )
264
293
265
- self .get_element(selector, by = By.CSS_SELECTOR , timeout = settings.LARGE_TIMEOUT )
266
-
267
- self .assert_element_present(selector, by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
268
-
269
- # #######
270
-
271
294
self .wait_for_element_visible(selector, by = By.CSS_SELECTOR , timeout = settings.LARGE_TIMEOUT )
272
295
273
296
self .wait_for_element(selector, by = By.CSS_SELECTOR , timeout = settings.LARGE_TIMEOUT )
274
297
298
+ self .get_element(selector, by = By.CSS_SELECTOR , timeout = settings.LARGE_TIMEOUT )
299
+
300
+ self .assert_element_present(selector, by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
301
+
275
302
self .find_element(selector, by = By.CSS_SELECTOR , timeout = settings.LARGE_TIMEOUT )
276
303
277
304
self .assert_element(selector, by = By.CSS_SELECTOR , timeout = settings.SMALL_TIMEOUT )
@@ -296,6 +323,10 @@ self.assert_exact_text(text, selector="html", by=By.CSS_SELECTOR, timeout=settin
296
323
297
324
# #######
298
325
326
+ self .wait_for_link_text_present(link_text, timeout = settings.SMALL_TIMEOUT )
327
+
328
+ self .wait_for_partial_link_text_present(link_text, timeout = settings.SMALL_TIMEOUT )
329
+
299
330
self .wait_for_link_text_visible(link_text, timeout = settings.LARGE_TIMEOUT )
300
331
301
332
self .wait_for_link_text(link_text, timeout = settings.LARGE_TIMEOUT )
@@ -326,35 +357,16 @@ self.assert_element_not_visible(selector, by=By.CSS_SELECTOR, timeout=settings.S
326
357
327
358
# #######
328
359
329
- self .wait_for_ready_state_complete(timeout = settings.EXTREME_TIMEOUT )
330
-
331
360
self .wait_for_and_accept_alert(timeout = settings.LARGE_TIMEOUT )
332
361
333
362
self .wait_for_and_dismiss_alert(timeout = settings.LARGE_TIMEOUT )
334
363
335
364
self .wait_for_and_switch_to_alert(timeout = settings.LARGE_TIMEOUT )
336
365
337
- self .switch_to_frame(frame, timeout = settings.SMALL_TIMEOUT )
338
-
339
- self .switch_to_default_content()
340
-
341
- self .open_new_window(switch_to = True )
342
-
343
- self .switch_to_window(window, timeout = settings.SMALL_TIMEOUT )
344
-
345
- self .switch_to_default_window()
366
+ # #######
346
367
347
368
self .check_window(name = " default" , level = 0 , baseline = False )
348
369
349
- self .save_screenshot(name, folder = None )
350
-
351
- self .get_new_driver(browser = None , headless = None , servername = None , port = None ,
352
- proxy = None , switch_to = True , cap_file = None )
353
-
354
- self .switch_to_driver(driver)
355
-
356
- self .switch_to_default_driver()
357
-
358
370
# #######
359
371
360
372
self .delayed_assert_element(selector, by = By.CSS_SELECTOR , timeout = settings.MINI_TIMEOUT )
0 commit comments