utils-seleniumxp 1.0.0__tar.gz

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.
@@ -0,0 +1,115 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ env/
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+
28
+ # PyInstaller
29
+ # Usually these files are written by a python script from a template
30
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ .hypothesis/
48
+ .pytest_cache/
49
+
50
+ # Translations
51
+ *.mo
52
+ *.pot
53
+
54
+ # Django stuff:
55
+ *.log
56
+ local_settings.py
57
+
58
+ # Flask stuff:
59
+ instance/
60
+ .webassets-cache
61
+
62
+ # Scrapy stuff:
63
+ .scrapy
64
+
65
+ # Sphinx documentation
66
+ docs/_build/
67
+
68
+ # PyBuilder
69
+ target/
70
+
71
+ # Jupyter Notebook
72
+ .ipynb_checkpoints
73
+
74
+ # pyenv
75
+ .python-version
76
+
77
+ # celery beat schedule file
78
+ celerybeat-schedule
79
+
80
+ # SageMath parsed files
81
+ *.sage.py
82
+
83
+ # dotenv
84
+ .env
85
+
86
+ # virtualenv
87
+ .venv
88
+ venv/
89
+ ENV/
90
+
91
+ # Spyder project settings
92
+ .spyderproject
93
+ .spyproject
94
+
95
+ # Rope project settings
96
+ .ropeproject
97
+
98
+ # mkdocs documentation
99
+ /site
100
+
101
+ # mypy
102
+ .mypy_cache/
103
+
104
+ # ruff
105
+ .ruff_cache/
106
+
107
+ # IDE settings
108
+ .vscode/
109
+ .idea/
110
+
111
+ # Version file generated by hatch-vcs
112
+ src/*/_version.py
113
+
114
+ # MacOS files
115
+ .DS_Store
@@ -0,0 +1,3 @@
1
+ # Contributors
2
+
3
+ * [dornech](https://github.com/dornech)
@@ -0,0 +1,33 @@
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Package with utilities and functional extensions for Selenium webdriver
5
+ Python language bindings
6
+ Copyright (C) 2024 dornech
7
+
8
+ This program is free software: you can redistribute it and/or modify
9
+ it under the terms of the GNU General Public License as published by
10
+ the Free Software Foundation, either version 3 of the License, or
11
+ (at your option) any later version.
12
+
13
+ This program is distributed in the hope that it will be useful,
14
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ GNU General Public License for more details.
17
+
18
+ You should have received a copy of the GNU General Public License
19
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+
21
+ Also add information on how to contact you by electronic and paper mail.
22
+
23
+ You should also get your employer (if you work as a programmer) or school,
24
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
25
+ For more information on this, and how to apply and follow the GNU GPL, see
26
+ <http://www.gnu.org/licenses/>.
27
+
28
+ The GNU General Public License does not permit incorporating your program
29
+ into proprietary programs. If your program is a subroutine library, you
30
+ may consider it more useful to permit linking proprietary applications with
31
+ the library. If this is what you want to do, use the GNU Lesser General
32
+ Public License instead of this License. But first, please read
33
+ <http://www.gnu.org/philosophy/why-not-lgpl.html>.
@@ -0,0 +1,96 @@
1
+ Metadata-Version: 2.4
2
+ Name: utils-seleniumxp
3
+ Version: 1.0.0
4
+ Summary: Package with utilities and functional extensions for Selenium webdriver Python language bindings
5
+ Project-URL: Documentation, https://dornech.github.io/utils-seleniumxp
6
+ Project-URL: Source, https://github.com/dornech/utils-seleniumxp
7
+ Project-URL: Tracker, https://github.com/dornech/utils-seleniumxp/issues
8
+ Project-URL: Sponsor, https://github.com/sponsors/dornech
9
+ Author-email: dornech <dornech@gmx.de>
10
+ License: GPL-3.0-only
11
+ License-File: AUTHORS.md
12
+ License-File: LICENSE.txt
13
+ Keywords: Chrome,FireFox,Selenium,close popup,event-firing webdriver,factory function,parsel,webdriver
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: Implementation :: CPython
21
+ Requires-Python: >=3.9
22
+ Requires-Dist: cssify
23
+ Requires-Dist: parsel
24
+ Requires-Dist: psutil
25
+ Requires-Dist: requests
26
+ Requires-Dist: selenium
27
+ Requires-Dist: selenium-requests
28
+ Requires-Dist: stealthenium
29
+ Requires-Dist: utils-mystuff
30
+ Description-Content-Type: text/markdown
31
+
32
+ # SeleniumXP utilities for Python
33
+
34
+ Package with utilities and functional extensions for Selenium webdriver Python language bindings
35
+
36
+ ## Features
37
+
38
+ The package consist of various helpers and extensions to the Selenium webdriver:
39
+
40
+ - module for session handling especially a custom factory function to initialize a webdriver object
41
+ - module with additional methods for the webdriver class
42
+ - module with convenience functions for locators
43
+ - module with additional methods for the webelement class
44
+ - an extended event-firing webdriver and an extended listener abstract base class
45
+ - a sample event listener implementation based on the extended abstract base class
46
+
47
+ Different from other packages extending the Selenium webdriver class does not work with
48
+ wrapping the original webdriver but providing a mixin class or alternatively directly setting
49
+ additional methods via 'setattr' in the original webdriver class. This is done and controlled
50
+ via a pretty versatile custom factory function initializing the webdriver.
51
+
52
+ The webelement extension are done via setattr only. Implementing a mixin class would require
53
+ to modify webdriver methods to return the new class with the mixin. So benefit of the
54
+ settattr approach is that extending the webelement class is independend from changes to the
55
+ webdriver class.
56
+
57
+ Note: as I am coming from camel case notation I was struggling a little bit with the Python naming conventions.
58
+ However, for publishing I tried to increase compliance with Python naming conventions and added snake case
59
+ method stubs (at least for most important subroutines) as a compromise.
60
+
61
+ ## Development
62
+
63
+ To set up [hatch] and [pre-commit] for the first time:
64
+
65
+ 1. install [hatch] globally, e.g. with [pipx], i.e. `pipx install hatch`,
66
+ 2. make sure `pre-commit` is installed globally, e.g. with `pipx install pre-commit`.
67
+
68
+ A special feature that makes hatch very different from other familiar tools is that you almost never
69
+ activate, or enter, an environment. Instead, you use `hatch run env_name:command` and the `default` environment
70
+ is assumed for a command if there is no colon found. Thus you must always define your environment in a declarative
71
+ way and hatch makes sure that the environment reflects your declaration by updating it whenever you issue
72
+ a `hatch run ...`. This helps with reproducability and avoids forgetting to specify dependencies since the
73
+ hatch workflow is to specify everything directly in [pyproject.toml](pyproject.toml). Only in rare cases, you
74
+ will use `hatch shell` to enter the `default` environment, which is similar to what you may know from other tools.
75
+
76
+ To get you started, use `hatch run test:cov` or `hatch run test:no-cov` to run the unitest with or without coverage reports,
77
+ respectively. Use `hatch run lint:all` to run all kinds of typing and linting checks. Try to automatically fix linting
78
+ problems with `hatch run lint:fix` and use `hatch run docs:serve` to build and serve your documentation.
79
+ You can also easily define your own environments and commands. Check out the environment setup of hatch
80
+ in [pyproject.toml](pyproject.toml) for more commands as well as the package, build and tool configuration.
81
+
82
+ To support versioning and changelog generation please refer to the toolchain selected during package
83
+ generation (see also `pyproject.toml`). If not deselected, the toolchain includes a [pre-commit] hook
84
+ for linting commit messages to ensure commit messages are compliant with the conventional commit format and
85
+ support an automated changelog generation.
86
+
87
+ ## Credits
88
+
89
+ This package was created with [The Hatchlor Enhanced] project template. This template is based on [The Hatchlor]
90
+ but was substantially improved.
91
+
92
+ [The Hatchlor Enhanced]: https://github.com/dornech/the-hatchlor-enhanced
93
+ [The Hatchlor]: https://github.com/florianwilhelm/the-hatchlor
94
+ [pipx]: https://pypa.github.io/pipx/
95
+ [hatch]: https://hatch.pypa.io/
96
+ [pre-commit]: https://pre-commit.com/
@@ -0,0 +1,65 @@
1
+ # SeleniumXP utilities for Python
2
+
3
+ Package with utilities and functional extensions for Selenium webdriver Python language bindings
4
+
5
+ ## Features
6
+
7
+ The package consist of various helpers and extensions to the Selenium webdriver:
8
+
9
+ - module for session handling especially a custom factory function to initialize a webdriver object
10
+ - module with additional methods for the webdriver class
11
+ - module with convenience functions for locators
12
+ - module with additional methods for the webelement class
13
+ - an extended event-firing webdriver and an extended listener abstract base class
14
+ - a sample event listener implementation based on the extended abstract base class
15
+
16
+ Different from other packages extending the Selenium webdriver class does not work with
17
+ wrapping the original webdriver but providing a mixin class or alternatively directly setting
18
+ additional methods via 'setattr' in the original webdriver class. This is done and controlled
19
+ via a pretty versatile custom factory function initializing the webdriver.
20
+
21
+ The webelement extension are done via setattr only. Implementing a mixin class would require
22
+ to modify webdriver methods to return the new class with the mixin. So benefit of the
23
+ settattr approach is that extending the webelement class is independend from changes to the
24
+ webdriver class.
25
+
26
+ Note: as I am coming from camel case notation I was struggling a little bit with the Python naming conventions.
27
+ However, for publishing I tried to increase compliance with Python naming conventions and added snake case
28
+ method stubs (at least for most important subroutines) as a compromise.
29
+
30
+ ## Development
31
+
32
+ To set up [hatch] and [pre-commit] for the first time:
33
+
34
+ 1. install [hatch] globally, e.g. with [pipx], i.e. `pipx install hatch`,
35
+ 2. make sure `pre-commit` is installed globally, e.g. with `pipx install pre-commit`.
36
+
37
+ A special feature that makes hatch very different from other familiar tools is that you almost never
38
+ activate, or enter, an environment. Instead, you use `hatch run env_name:command` and the `default` environment
39
+ is assumed for a command if there is no colon found. Thus you must always define your environment in a declarative
40
+ way and hatch makes sure that the environment reflects your declaration by updating it whenever you issue
41
+ a `hatch run ...`. This helps with reproducability and avoids forgetting to specify dependencies since the
42
+ hatch workflow is to specify everything directly in [pyproject.toml](pyproject.toml). Only in rare cases, you
43
+ will use `hatch shell` to enter the `default` environment, which is similar to what you may know from other tools.
44
+
45
+ To get you started, use `hatch run test:cov` or `hatch run test:no-cov` to run the unitest with or without coverage reports,
46
+ respectively. Use `hatch run lint:all` to run all kinds of typing and linting checks. Try to automatically fix linting
47
+ problems with `hatch run lint:fix` and use `hatch run docs:serve` to build and serve your documentation.
48
+ You can also easily define your own environments and commands. Check out the environment setup of hatch
49
+ in [pyproject.toml](pyproject.toml) for more commands as well as the package, build and tool configuration.
50
+
51
+ To support versioning and changelog generation please refer to the toolchain selected during package
52
+ generation (see also `pyproject.toml`). If not deselected, the toolchain includes a [pre-commit] hook
53
+ for linting commit messages to ensure commit messages are compliant with the conventional commit format and
54
+ support an automated changelog generation.
55
+
56
+ ## Credits
57
+
58
+ This package was created with [The Hatchlor Enhanced] project template. This template is based on [The Hatchlor]
59
+ but was substantially improved.
60
+
61
+ [The Hatchlor Enhanced]: https://github.com/dornech/the-hatchlor-enhanced
62
+ [The Hatchlor]: https://github.com/florianwilhelm/the-hatchlor
63
+ [pipx]: https://pypa.github.io/pipx/
64
+ [hatch]: https://hatch.pypa.io/
65
+ [pre-commit]: https://pre-commit.com/