selenium-query 0.1.0__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.
- selenium_query/__init__.py +10 -0
- selenium_query/_any_all_getters.py +17 -0
- selenium_query/_asserter_getter.py +90 -0
- selenium_query/_basics/__init__.py +0 -0
- selenium_query/_basics/action_getter.py +362 -0
- selenium_query/_basics/base_getter.py +177 -0
- selenium_query/_basics/boolean_getter.py +36 -0
- selenium_query/_basics/generic_value_getter.py +119 -0
- selenium_query/_filter_getter.py +53 -0
- selenium_query/_mapper_getter.py +226 -0
- selenium_query/_negation_transmitter.py +40 -0
- selenium_query/_order_getter.py +70 -0
- selenium_query/_types_and_tools.py +93 -0
- selenium_query/_values_getter.py +78 -0
- selenium_query/getter.py +61 -0
- selenium_query-0.1.0.dist-info/METADATA +19 -0
- selenium_query-0.1.0.dist-info/RECORD +18 -0
- selenium_query-0.1.0.dist-info/WHEEL +4 -0
selenium_query/getter.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
from typing import ClassVar
|
|
2
|
+
|
|
3
|
+
from ._basics.base_getter import BaseGetter
|
|
4
|
+
from ._basics.boolean_getter import BooleanGetter
|
|
5
|
+
from ._basics.action_getter import ActionGetter
|
|
6
|
+
from ._types_and_tools import _GetterSubClassesAsProperties
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Getter(ActionGetter, BooleanGetter, BaseGetter):
|
|
13
|
+
"""
|
|
14
|
+
"Intermediate level" class to ease access to various things in the page, trigger actions, ...
|
|
15
|
+
but without mixing all the behaviors together.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
subclass: ClassVar[_GetterSubClassesAsProperties] = _GetterSubClassesAsProperties()
|
|
19
|
+
|
|
20
|
+
def __init_subclass__(cls, accessor=None):
|
|
21
|
+
"""
|
|
22
|
+
The subclasses are registering themselves automatically this way, to avoid circular imports
|
|
23
|
+
troubles. The _GetterSubClasses object allow to enforce proper autocompletion hints.
|
|
24
|
+
"""
|
|
25
|
+
if accessor:
|
|
26
|
+
setattr(cls.subclass, accessor, cls)
|
|
27
|
+
|
|
28
|
+
#------------------------------------------------------------------------------------------
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def all(self):
|
|
32
|
+
return self.subclass.all.from_(self)
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def any(self):
|
|
36
|
+
return self.subclass.any.from_(self)
|
|
37
|
+
|
|
38
|
+
@property
|
|
39
|
+
def check(self):
|
|
40
|
+
return self.subclass.check.from_(self)
|
|
41
|
+
|
|
42
|
+
@property
|
|
43
|
+
def filter(self):
|
|
44
|
+
return self.subclass.filter.from_(self)
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def get(self):
|
|
48
|
+
return self.subclass.get.from_(self)
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
def map(self):
|
|
52
|
+
return self.subclass.map.from_(self)
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def not_(self):
|
|
56
|
+
""" WARNING: using `not_` "only" is equivalent to using `all.not_` """
|
|
57
|
+
return self.subclass.not_.from_(self)
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def order_by(self):
|
|
61
|
+
return self.subclass.order_by.from_(self)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: selenium-query
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python equivalent of jQuery, to write selenium tests.
|
|
5
|
+
License: GPL-3.0-or-later
|
|
6
|
+
Author: Frédéric Zinelli
|
|
7
|
+
Author-email: frederic.zinelli@gmail.com
|
|
8
|
+
Requires-Python: >=3.9, <4.0
|
|
9
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Requires-Dist: selenium (>=4.36)
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
selenium_query/__init__.py,sha256=5GR9hx0YPWD8Se65Jl5ugDdd57XXBPKWe8KCxmcnDNA,383
|
|
2
|
+
selenium_query/_any_all_getters.py,sha256=A_7ObbhvZNjakZzbt3SRRwh8LznTZcsb4fBnkogA7Tk,282
|
|
3
|
+
selenium_query/_asserter_getter.py,sha256=2zRLxB30kntjo89HS3ZUkHaDOwSkQPHz_DZrOwsP95w,2903
|
|
4
|
+
selenium_query/_basics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
selenium_query/_basics/action_getter.py,sha256=p609GkorGA_yQwqLifopswU9iDK-0CC4DriYJcLWXX0,14029
|
|
6
|
+
selenium_query/_basics/base_getter.py,sha256=YznJXuMcUAYezD5HvAJ1M9k3lIyhu_HWTmWEzt6IeMo,6023
|
|
7
|
+
selenium_query/_basics/boolean_getter.py,sha256=4vGseggvUVsZlGz3sCxQlMp4Bz7fZU_EIgl67Vqnnr4,1011
|
|
8
|
+
selenium_query/_basics/generic_value_getter.py,sha256=MuiMnHR9fALs2G_g5Z-svLExAxaU-2mQfscs6DeIqZs,4216
|
|
9
|
+
selenium_query/_filter_getter.py,sha256=SbcnGXMfWC1mtFfzuXTG_N6Ib0NHBNOdT6sQ1r1fngs,1777
|
|
10
|
+
selenium_query/_mapper_getter.py,sha256=S8_iutUg73GovVV4pHhafNKuc6qqKVkVXAQ78VQvBYs,8001
|
|
11
|
+
selenium_query/_negation_transmitter.py,sha256=5tPJA5kSifIu-5xYrJO6RGcHGDbxux5w6RjW-4f7s1c,1009
|
|
12
|
+
selenium_query/_order_getter.py,sha256=9zqyuI8bhvglmjFkiBOxZtIfyjdfMxu1wv9BDr9-j2Y,2423
|
|
13
|
+
selenium_query/_types_and_tools.py,sha256=_iNK5ZN4lUw_45tmx6GXyxLX4JNTBKrFf5SnAkspIJk,1911
|
|
14
|
+
selenium_query/_values_getter.py,sha256=MKIzkR-qkyjMZGlnNWmMW4tCFDMqJ4P-PnlyNDIeJy8,2837
|
|
15
|
+
selenium_query/getter.py,sha256=VvClZO_vDPsljTIseMVBwjXFxxUejRVmGXdhM7YEA98,1710
|
|
16
|
+
selenium_query-0.1.0.dist-info/METADATA,sha256=h1fUdy283KJK7iPe5SzhGJHB0YT0F846Xwy-jjxO98I,708
|
|
17
|
+
selenium_query-0.1.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
18
|
+
selenium_query-0.1.0.dist-info/RECORD,,
|