seleniumbase 4.32.3__py3-none-any.whl → 4.32.4a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- seleniumbase/__version__.py +1 -1
- seleniumbase/undetected/__init__.py +1 -1
- seleniumbase/undetected/cdp_driver/config.py +7 -0
- seleniumbase/undetected/cdp_driver/connection.py +9 -1
- seleniumbase/undetected/options.py +33 -7
- {seleniumbase-4.32.3.dist-info → seleniumbase-4.32.4a1.dist-info}/METADATA +45 -45
- {seleniumbase-4.32.3.dist-info → seleniumbase-4.32.4a1.dist-info}/RECORD +11 -11
- {seleniumbase-4.32.3.dist-info → seleniumbase-4.32.4a1.dist-info}/LICENSE +0 -0
- {seleniumbase-4.32.3.dist-info → seleniumbase-4.32.4a1.dist-info}/WHEEL +0 -0
- {seleniumbase-4.32.3.dist-info → seleniumbase-4.32.4a1.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.32.3.dist-info → seleniumbase-4.32.4a1.dist-info}/top_level.txt +0 -0
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.32.
|
2
|
+
__version__ = "4.32.4a1"
|
@@ -5,6 +5,7 @@ import secrets
|
|
5
5
|
import sys
|
6
6
|
import tempfile
|
7
7
|
import zipfile
|
8
|
+
from seleniumbase.config import settings
|
8
9
|
from typing import Union, List, Optional
|
9
10
|
|
10
11
|
__all__ = [
|
@@ -101,7 +102,13 @@ class Config:
|
|
101
102
|
# Other keyword args will be accessible by attribute
|
102
103
|
self.__dict__.update(kwargs)
|
103
104
|
super().__init__()
|
105
|
+
start_width = settings.CHROME_START_WIDTH
|
106
|
+
start_height = settings.CHROME_START_HEIGHT
|
107
|
+
start_x = settings.WINDOW_START_X
|
108
|
+
start_y = settings.WINDOW_START_Y
|
104
109
|
self._default_browser_args = [
|
110
|
+
"--window-size=%s,%s" % (start_width, start_height),
|
111
|
+
"--window-position=%s,%s" % (start_x, start_y),
|
105
112
|
"--remote-allow-origins=*",
|
106
113
|
"--no-first-run",
|
107
114
|
"--no-service-autorun",
|
@@ -292,7 +292,14 @@ class Connection(metaclass=CantTouchThis):
|
|
292
292
|
if self.listener and self.listener.running:
|
293
293
|
self.listener.cancel()
|
294
294
|
self.enabled_domains.clear()
|
295
|
-
await
|
295
|
+
await asyncio.sleep(0.015)
|
296
|
+
try:
|
297
|
+
await self.websocket.close()
|
298
|
+
except Exception:
|
299
|
+
logger.debug(
|
300
|
+
"\n❌ Error closing websocket connection to %s",
|
301
|
+
self.websocket_url
|
302
|
+
)
|
296
303
|
logger.debug(
|
297
304
|
"\n❌ Closed websocket connection to %s", self.websocket_url
|
298
305
|
)
|
@@ -540,6 +547,7 @@ class Listener:
|
|
540
547
|
self.idle.set()
|
541
548
|
# Pause for a moment.
|
542
549
|
# await asyncio.sleep(self.time_before_considered_idle / 10)
|
550
|
+
await asyncio.sleep(0.015)
|
543
551
|
continue
|
544
552
|
except (Exception,) as e:
|
545
553
|
logger.debug(
|
@@ -1,9 +1,13 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
2
|
import json
|
3
|
+
import logging
|
3
4
|
import os
|
5
|
+
import time
|
4
6
|
from contextlib import suppress
|
5
7
|
from selenium.webdriver.chromium.options import ChromiumOptions
|
6
8
|
|
9
|
+
logger = logging.getLogger(__name__)
|
10
|
+
|
7
11
|
|
8
12
|
class ChromeOptions(ChromiumOptions):
|
9
13
|
_session = None
|
@@ -53,14 +57,36 @@ class ChromeOptions(ChromiumOptions):
|
|
53
57
|
with suppress(Exception):
|
54
58
|
if os.path.exists(prefs_file):
|
55
59
|
with open(
|
56
|
-
prefs_file,
|
60
|
+
prefs_file,
|
61
|
+
encoding="latin1",
|
62
|
+
mode="r",
|
63
|
+
errors="ignore",
|
57
64
|
) as f:
|
58
|
-
|
59
|
-
|
60
|
-
)
|
61
|
-
|
62
|
-
|
63
|
-
|
65
|
+
data = json.load(f)
|
66
|
+
logger.debug("Existing preferences: %s" % data)
|
67
|
+
undot_prefs = self._merge_nested(data, undot_prefs)
|
68
|
+
logger.debug("Combined preferences: %s" % undot_prefs)
|
69
|
+
time.sleep(0.005)
|
70
|
+
if not os.path.exists(prefs_file):
|
71
|
+
try:
|
72
|
+
with open(
|
73
|
+
prefs_file,
|
74
|
+
encoding="latin1",
|
75
|
+
mode="w",
|
76
|
+
errors="ignore",
|
77
|
+
) as f:
|
78
|
+
json.dump(undot_prefs, f)
|
79
|
+
except Exception:
|
80
|
+
time.sleep(0.005)
|
81
|
+
with suppress(Exception):
|
82
|
+
with open(
|
83
|
+
prefs_file,
|
84
|
+
encoding="utf-8",
|
85
|
+
mode="w",
|
86
|
+
errors="ignore",
|
87
|
+
) as f:
|
88
|
+
json.dump(undot_prefs, f)
|
89
|
+
time.sleep(0.005)
|
64
90
|
# Remove experimental_options to avoid errors
|
65
91
|
del self._experimental_options["prefs"]
|
66
92
|
exclude_switches = self.experimental_options.get("excludeSwitches")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.32.
|
3
|
+
Version: 4.32.4a1
|
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
|
@@ -59,7 +59,7 @@ Classifier: Topic :: Utilities
|
|
59
59
|
Requires-Python: >=3.8
|
60
60
|
Description-Content-Type: text/markdown
|
61
61
|
License-File: LICENSE
|
62
|
-
Requires-Dist: pip>=24.
|
62
|
+
Requires-Dist: pip>=24.3
|
63
63
|
Requires-Dist: packaging>=24.1
|
64
64
|
Requires-Dist: wheel>=0.44.0
|
65
65
|
Requires-Dist: attrs>=24.2.0
|
@@ -489,48 +489,49 @@ pip install -e .
|
|
489
489
|
🔵 **Type ``seleniumbase`` or ``sbase`` to verify that SeleniumBase was installed successfully:**
|
490
490
|
|
491
491
|
```bash
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
COMMANDS:
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
492
|
+
___ _ _ ___
|
493
|
+
/ __| ___| |___ _ _ (_)_ _ _ __ | _ ) __ _ ______
|
494
|
+
\__ \/ -_) / -_) ' \| | \| | ' \ | _ \/ _` (_-< -_)
|
495
|
+
|___/\___|_\___|_||_|_|\_,_|_|_|_\|___/\__,_/__|___|
|
496
|
+
----------------------------------------------------
|
497
|
+
|
498
|
+
╭──────────────────────────────────────────────────╮
|
499
|
+
│ * USAGE: "seleniumbase [COMMAND] [PARAMETERS]" │
|
500
|
+
│ * OR: "sbase [COMMAND] [PARAMETERS]" │
|
501
|
+
│ │
|
502
|
+
│ COMMANDS: PARAMETERS / DESCRIPTIONS: │
|
503
|
+
│ get / install [DRIVER_NAME] [OPTIONS] │
|
504
|
+
│ methods (List common Python methods) │
|
505
|
+
│ options (List common pytest options) │
|
506
|
+
│ behave-options (List common behave options) │
|
507
|
+
│ gui / commander [OPTIONAL PATH or TEST FILE] │
|
508
|
+
│ behave-gui (SBase Commander for Behave) │
|
509
|
+
│ caseplans [OPTIONAL PATH or TEST FILE] │
|
510
|
+
│ mkdir [DIRECTORY] [OPTIONS] │
|
511
|
+
│ mkfile [FILE.py] [OPTIONS] │
|
512
|
+
│ mkrec / codegen [FILE.py] [OPTIONS] │
|
513
|
+
│ recorder (Open Recorder Desktop App.) │
|
514
|
+
│ record (If args: mkrec. Else: App.) │
|
515
|
+
│ mkpres [FILE.py] [LANG] │
|
516
|
+
│ mkchart [FILE.py] [LANG] │
|
517
|
+
│ print [FILE] [OPTIONS] │
|
518
|
+
│ translate [SB_FILE.py] [LANG] [ACTION] │
|
519
|
+
│ convert [WEBDRIVER_UNITTEST_FILE.py] │
|
520
|
+
│ extract-objects [SB_FILE.py] │
|
521
|
+
│ inject-objects [SB_FILE.py] [OPTIONS] │
|
522
|
+
│ objectify [SB_FILE.py] [OPTIONS] │
|
523
|
+
│ revert-objects [SB_FILE.py] [OPTIONS] │
|
524
|
+
│ encrypt / obfuscate │
|
525
|
+
│ decrypt / unobfuscate │
|
526
|
+
│ proxy (Start a basic proxy server) │
|
527
|
+
│ download server (Get Selenium Grid JAR file) │
|
528
|
+
│ grid-hub [start|stop] [OPTIONS] │
|
529
|
+
│ grid-node [start|stop] --hub=[HOST/IP] │
|
530
|
+
│ │
|
531
|
+
│ * EXAMPLE => "sbase get chromedriver stable" │
|
532
|
+
│ * For command info => "sbase help [COMMAND]" │
|
533
|
+
│ * For info on all commands => "sbase --help" │
|
534
|
+
╰──────────────────────────────────────────────────╯
|
534
535
|
```
|
535
536
|
|
536
537
|
<h3>🔵 Downloading webdrivers:</h3>
|
@@ -1549,7 +1550,6 @@ pytest --reruns=1 --reruns-delay=1
|
|
1549
1550
|
<span><a href="https://github.com/seleniumbase/SeleniumBase"><img src="https://seleniumbase.github.io/img/social/share_github.svg" title="SeleniumBase on GitHub" alt="SeleniumBase on GitHub" width="64" /></a></span>
|
1550
1551
|
<span><a href="https://discord.gg/EdhQTn3EyE"><img src="https://seleniumbase.github.io/other/discord_icon.png" title="SeleniumBase on Discord" alt="SeleniumBase on Discord" width="66" /></a></span>
|
1551
1552
|
<span><a href="https://www.facebook.com/SeleniumBase"><img src="https://seleniumbase.io/img/social/share_facebook.svg" title="SeleniumBase on Facebook" alt="SeleniumBase on Facebook" width="62" /></a></span>
|
1552
|
-
<span><a href="https://gitter.im/seleniumbase/SeleniumBase" target="_blank"><img src="https://seleniumbase.github.io/img/social/share_gitter.svg" title="SeleniumBase on Gitter" alt="SeleniumBase on Gitter" width="48" /></a></span>
|
1553
1553
|
</div></p>
|
1554
1554
|
|
1555
1555
|
<p><div><b><a href="https://github.com/mdmintz">https://github.com/mdmintz</a></b></div></p>
|
@@ -3,7 +3,7 @@ sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
|
|
3
3
|
sbase/steps.py,sha256=bKT_u5bJkKzYWEuAXi9NVVRYYxQRCM1_YJUrNFFRVPY,42865
|
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=p3-TsNmVZnxoL7V9NMUn0fjSrX_dTOvJak7Ef8Bil9o,48
|
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=-hza7Nx2U41mSObYiPMi48v3JlPh3sJO3yzP0kqZ1Gk,59174
|
@@ -106,10 +106,10 @@ seleniumbase/translate/portuguese.py,sha256=x3P4qxp56UiI41GoaL7JbUvFRYsgXU1EKjTg
|
|
106
106
|
seleniumbase/translate/russian.py,sha256=TyN9n0b4GRWDEYnHRGw1rfNAscdDmP3F3Y3aySM3C7s,27978
|
107
107
|
seleniumbase/translate/spanish.py,sha256=hh3xgW1Pq122SHYVvJAxFaXhFrjniOVncVbJbfWqOUM,25528
|
108
108
|
seleniumbase/translate/translator.py,sha256=wPhZH6e5NhmebYL1kP2eGxUcVy1gfTb6XCH8ATEPpxE,49238
|
109
|
-
seleniumbase/undetected/__init__.py,sha256=
|
109
|
+
seleniumbase/undetected/__init__.py,sha256=3UukttRSdScUGCrms2BK35os3uSt130Z1BtxQJmhqxE,22136
|
110
110
|
seleniumbase/undetected/cdp.py,sha256=EralLQm8diG5i6EoHFXHIQEc7Uf7PWtzyPH_upS5RIs,4047
|
111
111
|
seleniumbase/undetected/dprocess.py,sha256=VLwyLWXSg-6GkeKpAQcTXLRmuBb0oEdku3_qgMifuwY,1705
|
112
|
-
seleniumbase/undetected/options.py,sha256=
|
112
|
+
seleniumbase/undetected/options.py,sha256=3a-W5AkRR4PPU9PuaHlG7IZXIp5XbECxvk-73wHfOhY,3913
|
113
113
|
seleniumbase/undetected/patcher.py,sha256=GqNqUwqDDFZg-Y3O6JOyFoOGhHN0r5PV46Mc9b9_BP0,10849
|
114
114
|
seleniumbase/undetected/reactor.py,sha256=UT1pEnGaTPZT7-0-xKROk9_eWDZueGzSUrCksc22nyA,2883
|
115
115
|
seleniumbase/undetected/webelement.py,sha256=_s6evgUkdWJpwOnzX4qR9i796PoVbz3txlzHlOBJ4BE,1370
|
@@ -117,8 +117,8 @@ seleniumbase/undetected/cdp_driver/__init__.py,sha256=c0TjMwPfVFyoqYOJ7PQ-Jln_L_
|
|
117
117
|
seleniumbase/undetected/cdp_driver/_contradict.py,sha256=6thDYeoEGiC7Q3tXLgoD_AhxecCFnATzBSjNympyRHA,3184
|
118
118
|
seleniumbase/undetected/cdp_driver/browser.py,sha256=2suM75F3TV-svgBXdRZoxfqErr6_USa8_jOLwHSLlIk,30025
|
119
119
|
seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=y60sU5rIguohZDl1tgCpuDhu3Wo6TcgvZIbqXdHIv8E,11111
|
120
|
-
seleniumbase/undetected/cdp_driver/config.py,sha256=
|
121
|
-
seleniumbase/undetected/cdp_driver/connection.py,sha256=
|
120
|
+
seleniumbase/undetected/cdp_driver/config.py,sha256=Rjvde7V-XJ0ihZdTmOmHEVWSuDWm3SprQ3njg8SN3Go,12087
|
121
|
+
seleniumbase/undetected/cdp_driver/connection.py,sha256=HnwXlD4rawGzCyiGR3Shr4iaK7KTncvSqs3CXxCZM_8,23266
|
122
122
|
seleniumbase/undetected/cdp_driver/element.py,sha256=9oD9GxguctunrlHV3lWXlZgb9cNEjD5x03Oy84OqyVA,39631
|
123
123
|
seleniumbase/undetected/cdp_driver/tab.py,sha256=wUNF8GHrbhaUqg57A9ZTYHKhNPjZIcOHwrz3pj1SAg0,50526
|
124
124
|
seleniumbase/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -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.32.
|
139
|
-
seleniumbase-4.32.
|
140
|
-
seleniumbase-4.32.
|
141
|
-
seleniumbase-4.32.
|
142
|
-
seleniumbase-4.32.
|
143
|
-
seleniumbase-4.32.
|
138
|
+
seleniumbase-4.32.4a1.dist-info/LICENSE,sha256=odSYtWibXBnQ1gBg6CnDZ82n8kLF_if5-2nbqnEyD8k,1085
|
139
|
+
seleniumbase-4.32.4a1.dist-info/METADATA,sha256=0y0snuA19qHT4QS36utt8jBsCN15L0DShe4Rc6Zo-Ds,86095
|
140
|
+
seleniumbase-4.32.4a1.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
141
|
+
seleniumbase-4.32.4a1.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
142
|
+
seleniumbase-4.32.4a1.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
143
|
+
seleniumbase-4.32.4a1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|