seleniumbase 4.34.16__py3-none-any.whl → 4.34.17__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- seleniumbase/__version__.py +1 -1
- seleniumbase/core/sb_cdp.py +37 -3
- seleniumbase/plugins/base_plugin.py +12 -15
- seleniumbase/plugins/selenium_plugin.py +1 -0
- {seleniumbase-4.34.16.dist-info → seleniumbase-4.34.17.dist-info}/METADATA +2 -2
- {seleniumbase-4.34.16.dist-info → seleniumbase-4.34.17.dist-info}/RECORD +10 -10
- {seleniumbase-4.34.16.dist-info → seleniumbase-4.34.17.dist-info}/LICENSE +0 -0
- {seleniumbase-4.34.16.dist-info → seleniumbase-4.34.17.dist-info}/WHEEL +0 -0
- {seleniumbase-4.34.16.dist-info → seleniumbase-4.34.17.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.34.16.dist-info → seleniumbase-4.34.17.dist-info}/top_level.txt +0 -0
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.34.
|
2
|
+
__version__ = "4.34.17"
|
seleniumbase/core/sb_cdp.py
CHANGED
@@ -56,6 +56,9 @@ class CDPMethods():
|
|
56
56
|
element, *args, **kwargs
|
57
57
|
)
|
58
58
|
element.focus = lambda: self.__focus(element)
|
59
|
+
element.gui_click = (
|
60
|
+
lambda *args, **kwargs: self.__gui_click(element, *args, **kwargs)
|
61
|
+
)
|
59
62
|
element.highlight_overlay = lambda: self.__highlight_overlay(element)
|
60
63
|
element.mouse_click = lambda: self.__mouse_click(element)
|
61
64
|
element.mouse_drag = (
|
@@ -426,6 +429,39 @@ class CDPMethods():
|
|
426
429
|
self.loop.run_until_complete(element.focus_async())
|
427
430
|
)
|
428
431
|
|
432
|
+
def __gui_click(self, element, timeframe=None):
|
433
|
+
element.scroll_into_view()
|
434
|
+
self.__add_light_pause()
|
435
|
+
position = element.get_position()
|
436
|
+
x = position.x
|
437
|
+
y = position.y
|
438
|
+
e_width = position.width
|
439
|
+
e_height = position.height
|
440
|
+
# Relative to window
|
441
|
+
element_rect = {"height": e_height, "width": e_width, "x": x, "y": y}
|
442
|
+
window_rect = self.get_window_rect()
|
443
|
+
w_bottom_y = window_rect["y"] + window_rect["height"]
|
444
|
+
viewport_height = window_rect["innerHeight"]
|
445
|
+
x = window_rect["x"] + element_rect["x"]
|
446
|
+
y = w_bottom_y - viewport_height + element_rect["y"]
|
447
|
+
y_scroll_offset = window_rect["pageYOffset"]
|
448
|
+
y = y - y_scroll_offset
|
449
|
+
x = x + window_rect["scrollX"]
|
450
|
+
y = y + window_rect["scrollY"]
|
451
|
+
# Relative to screen
|
452
|
+
element_rect = {"height": e_height, "width": e_width, "x": x, "y": y}
|
453
|
+
e_width = element_rect["width"]
|
454
|
+
e_height = element_rect["height"]
|
455
|
+
e_x = element_rect["x"]
|
456
|
+
e_y = element_rect["y"]
|
457
|
+
x, y = ((e_x + e_width / 2.0) + 0.5), ((e_y + e_height / 2.0) + 0.5)
|
458
|
+
if not timeframe or not isinstance(timeframe, (int, float)):
|
459
|
+
timeframe = 0.25
|
460
|
+
if timeframe > 3:
|
461
|
+
timeframe = 3
|
462
|
+
self.gui_click_x_y(x, y, timeframe=timeframe)
|
463
|
+
return self.loop.run_until_complete(self.page.wait())
|
464
|
+
|
429
465
|
def __highlight_overlay(self, element):
|
430
466
|
return (
|
431
467
|
self.loop.run_until_complete(element.highlight_overlay_async())
|
@@ -461,9 +497,7 @@ class CDPMethods():
|
|
461
497
|
element.send_keys("\r\n")
|
462
498
|
time.sleep(0.044)
|
463
499
|
self.__slow_mode_pause_if_set()
|
464
|
-
return (
|
465
|
-
self.loop.run_until_complete(self.page.wait())
|
466
|
-
)
|
500
|
+
return self.loop.run_until_complete(self.page.wait())
|
467
501
|
|
468
502
|
def __query_selector(self, element, selector):
|
469
503
|
selector = self.__convert_to_css_if_xpath(selector)
|
@@ -208,7 +208,6 @@ class Base(Plugin):
|
|
208
208
|
self.duration = float(0)
|
209
209
|
self.page_results_list = []
|
210
210
|
self.test_count = 0
|
211
|
-
self.import_error = False
|
212
211
|
log_path = constants.Logs.LATEST + "/"
|
213
212
|
archive_logs = options.archive_logs
|
214
213
|
log_helper.log_folder_setup(log_path, archive_logs)
|
@@ -238,6 +237,7 @@ class Base(Plugin):
|
|
238
237
|
)
|
239
238
|
else:
|
240
239
|
variables = {}
|
240
|
+
test.test.test_id = test.id()
|
241
241
|
test.test.is_nosetest = True
|
242
242
|
test.test.environment = self.options.environment
|
243
243
|
test.test.env = self.options.environment # Add a shortened version
|
@@ -263,17 +263,16 @@ class Base(Plugin):
|
|
263
263
|
)
|
264
264
|
log_helper.clear_empty_logs()
|
265
265
|
if self.report_on:
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
)
|
266
|
+
report_helper.add_bad_page_log_file(self.page_results_list)
|
267
|
+
report_log_path = report_helper.archive_new_report_logs()
|
268
|
+
report_helper.build_report(
|
269
|
+
report_log_path,
|
270
|
+
self.page_results_list,
|
271
|
+
self.successes,
|
272
|
+
self.failures,
|
273
|
+
self.options.browser,
|
274
|
+
self.show_report,
|
275
|
+
)
|
277
276
|
|
278
277
|
def addSuccess(self, test, capt):
|
279
278
|
if self.report_on:
|
@@ -293,9 +292,6 @@ class Base(Plugin):
|
|
293
292
|
"%.2fs" % (float(time.time()) - float(self.start_time))
|
294
293
|
)
|
295
294
|
if test.id() == "nose.failure.Failure.runTest":
|
296
|
-
print(">>> ERROR: Could not locate tests to run!")
|
297
|
-
print(">>> The Test Report WILL NOT be generated!")
|
298
|
-
self.import_error = True
|
299
295
|
return
|
300
296
|
self.failures.append(test.id())
|
301
297
|
self.page_results_list.append(
|
@@ -314,6 +310,7 @@ class Base(Plugin):
|
|
314
310
|
test._log_fail_data()
|
315
311
|
sb_config._excinfo_tb = err
|
316
312
|
log_path = None
|
313
|
+
source = None
|
317
314
|
if hasattr(sb_config, "_test_logpath"):
|
318
315
|
log_path = sb_config._test_logpath
|
319
316
|
if hasattr(sb_config, "_last_page_source"):
|
@@ -1309,6 +1309,7 @@ class SeleniumBrowser(Plugin):
|
|
1309
1309
|
test.test.dashboard = False
|
1310
1310
|
test.test._multithreaded = False
|
1311
1311
|
test.test._reuse_session = False
|
1312
|
+
sb_config.recorder_mode = test.test.recorder_mode
|
1312
1313
|
sb_config.no_screenshot = test.test.no_screenshot_after_test
|
1313
1314
|
if test.test.servername != "localhost":
|
1314
1315
|
# Using Selenium Grid
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.34.
|
3
|
+
Version: 4.34.17
|
4
4
|
Summary: A complete web automation framework for end-to-end testing.
|
5
5
|
Home-page: https://github.com/seleniumbase/SeleniumBase
|
6
6
|
Author: Michael Mintz
|
@@ -73,7 +73,7 @@ Requires-Dist: filelock~=3.16.1; python_version < "3.9"
|
|
73
73
|
Requires-Dist: filelock>=3.17.0; python_version >= "3.9"
|
74
74
|
Requires-Dist: fasteners>=0.19
|
75
75
|
Requires-Dist: mycdp>=1.1.0
|
76
|
-
Requires-Dist: pynose>=1.5.
|
76
|
+
Requires-Dist: pynose>=1.5.4
|
77
77
|
Requires-Dist: platformdirs>=4.3.6
|
78
78
|
Requires-Dist: typing-extensions>=4.12.2
|
79
79
|
Requires-Dist: sbvirtualdisplay>=1.4.0
|
@@ -3,7 +3,7 @@ sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
|
|
3
3
|
sbase/steps.py,sha256=_WvAjydKqZfTdnZW9LPKkRty-g-lfdUPmLqnZj6ulcs,43013
|
4
4
|
seleniumbase/__init__.py,sha256=OtJh8nGKL4xtZpw8KPqmn7Q6R-86t4cWUDyVF5MbMTo,2398
|
5
5
|
seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
|
6
|
-
seleniumbase/__version__.py,sha256=
|
6
|
+
seleniumbase/__version__.py,sha256=vIFqdnUOqcmcmwm0-qV98kYIIaNPwIX58syRef-q60U,47
|
7
7
|
seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
seleniumbase/behave/behave_helper.py,sha256=elkl8P9eLulRAioLstE9baYNM9N_PHBmAOcajX-pH_Y,24198
|
9
9
|
seleniumbase/behave/behave_sb.py,sha256=qQF85LoohJBfrPK5ZcPi50v-pWtOrC9qcN1B3Ki_3tY,59401
|
@@ -50,7 +50,7 @@ seleniumbase/core/proxy_helper.py,sha256=4VkpMwavz0fx8wcOqJ_jyBT0HIXwcxmAcpd1gjJ
|
|
50
50
|
seleniumbase/core/recorder_helper.py,sha256=fNGjbapXmEsht54x1o6Igk198QdnPxDDnjUOzQxNhNQ,25055
|
51
51
|
seleniumbase/core/report_helper.py,sha256=AIl6Qava2yW1uSzbLpJBlPlYDz0KE-rVhogh8hsGWBo,12201
|
52
52
|
seleniumbase/core/s3_manager.py,sha256=bkeI8I4y19ebWuQG1oEZV5qJbotC6eN8vin31OCNWJk,3521
|
53
|
-
seleniumbase/core/sb_cdp.py,sha256=
|
53
|
+
seleniumbase/core/sb_cdp.py,sha256=lVBc8wFEjv811heZ_FYNQjSgzy-qOoZmhWOteoBB8Rw,80634
|
54
54
|
seleniumbase/core/sb_driver.py,sha256=yvTDRblBzG6bDX7XcLiAA6QcBelSJj_HHL_04lcfeeE,13760
|
55
55
|
seleniumbase/core/session_helper.py,sha256=s9zD3PVZEWVzG2h81cCUskbNWLfdjC_LwwQjKptHCak,558
|
56
56
|
seleniumbase/core/settings_parser.py,sha256=gqVohHVlE_5L5Cqe2L24uYrRzvoK-saX8E_Df7_-_3I,7609
|
@@ -83,7 +83,7 @@ seleniumbase/js_code/recorder_js.py,sha256=ApFNh6DImuPGmaydvq8OOzGixc0t-xdYSCzfQ
|
|
83
83
|
seleniumbase/masterqa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
84
84
|
seleniumbase/masterqa/master_qa.py,sha256=jLWmAx32Rnu1IhmvrRt8BbsUIcDW5xYj2ouVozny-Y4,19258
|
85
85
|
seleniumbase/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
86
|
-
seleniumbase/plugins/base_plugin.py,sha256=
|
86
|
+
seleniumbase/plugins/base_plugin.py,sha256=ItLgtaZmu_363iycy8BNX0Do5LyIWGiTMLW6krXM-WQ,14748
|
87
87
|
seleniumbase/plugins/basic_test_info.py,sha256=8ov6n417gPbqqvrlT4zrch7l2XcRt-GF2ny6rR9AMWk,2108
|
88
88
|
seleniumbase/plugins/db_reporting_plugin.py,sha256=En09qUCoojrk9-vbcnsoHdSELoGmag2GDIyu3jTiJas,7331
|
89
89
|
seleniumbase/plugins/driver_manager.py,sha256=QGGekWvcj58VMGr87UyXl1OvVTMjZDEdt8jaq7K13u8,35863
|
@@ -92,7 +92,7 @@ seleniumbase/plugins/pytest_plugin.py,sha256=SKCHzUFSd8dHPQwYQTJp-6AX7YD6Kce-Mem
|
|
92
92
|
seleniumbase/plugins/s3_logging_plugin.py,sha256=WDfertQgGOW_SRJpFMaekYD6vBVW9VO62POtXXy2HCM,2319
|
93
93
|
seleniumbase/plugins/sb_manager.py,sha256=aOaP5ZxLM7EfpLml4f_iBXkidKtFA1KcZQQIGm4aSQQ,56242
|
94
94
|
seleniumbase/plugins/screen_shots.py,sha256=1hrXw-hzuZ1BR6Yh7AyWX2ABnvnP73-RCbwdz958gj4,1127
|
95
|
-
seleniumbase/plugins/selenium_plugin.py,sha256=
|
95
|
+
seleniumbase/plugins/selenium_plugin.py,sha256=y0eNco8T4KgGLProLPHPLw479QH5lRms4wqwOnTgkSc,60081
|
96
96
|
seleniumbase/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
97
97
|
seleniumbase/translate/__init__.py,sha256=N2i5XntTwJZmwr9-qvdX5gC6Rdm5-ClIbnQ8yyPn4Oo,459
|
98
98
|
seleniumbase/translate/chinese.py,sha256=0QhK2eadtsdN4KCvwki1J7jBCe8I4xxWbKzteJKJozY,24698
|
@@ -135,9 +135,9 @@ seleniumbase/utilities/selenium_grid/start-grid-hub.bat,sha256=Ftq-GrAKRYH2ssDPr
|
|
135
135
|
seleniumbase/utilities/selenium_grid/start-grid-hub.sh,sha256=KADv0RUHONLL2_I443QFK8PryBpDmKn5Gy0s4o0vDSM,106
|
136
136
|
seleniumbase/utilities/selenium_ide/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
137
137
|
seleniumbase/utilities/selenium_ide/convert_ide.py,sha256=pZFnqEJQEKZPyNFjkLD29s2HPQgCrWW9XJWpCPhWOoM,31691
|
138
|
-
seleniumbase-4.34.
|
139
|
-
seleniumbase-4.34.
|
140
|
-
seleniumbase-4.34.
|
141
|
-
seleniumbase-4.34.
|
142
|
-
seleniumbase-4.34.
|
143
|
-
seleniumbase-4.34.
|
138
|
+
seleniumbase-4.34.17.dist-info/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
|
139
|
+
seleniumbase-4.34.17.dist-info/METADATA,sha256=MGfOlO3qTkVTaxkFd0ZEBL2MziR0VazxxIx-upXuezc,86522
|
140
|
+
seleniumbase-4.34.17.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
141
|
+
seleniumbase-4.34.17.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
142
|
+
seleniumbase-4.34.17.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
143
|
+
seleniumbase-4.34.17.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|