tquality-py-selenium 0.1.5__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.
@@ -0,0 +1,322 @@
1
+ Metadata-Version: 2.4
2
+ Name: tquality-py-selenium
3
+ Version: 0.1.5
4
+ Summary: Selenium integration for the tquality test automation framework, built on tquality-py-core.
5
+ Project-URL: Homepage, https://github.com/Tquality-ru/tquality-py-selenium
6
+ Project-URL: Repository, https://github.com/Tquality-ru/tquality-py-selenium
7
+ Project-URL: Issues, https://github.com/Tquality-ru/tquality-py-selenium/issues
8
+ Project-URL: Changelog, https://github.com/Tquality-ru/tquality-py-selenium/blob/master/CHANGELOG.md
9
+ Author: ООО «Точка качества»
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ License-File: NOTICE
13
+ Keywords: allure,page-object,qa,selenium,test-automation,testing,tquality,webdriver
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Framework :: Pytest
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Software Development :: Quality Assurance
23
+ Classifier: Topic :: Software Development :: Testing
24
+ Classifier: Typing :: Typed
25
+ Requires-Python: >=3.12
26
+ Requires-Dist: imageio-ffmpeg>=0.5
27
+ Requires-Dist: imageio>=2.34
28
+ Requires-Dist: numpy>=1.26
29
+ Requires-Dist: pillow>=10
30
+ Requires-Dist: selenium>=4.25
31
+ Requires-Dist: setuptools>=60
32
+ Requires-Dist: tquality-py-core>=0.1.5
33
+ Requires-Dist: undetected-chromedriver>=3.5
34
+ Description-Content-Type: text/markdown
35
+
36
+ # tquality-py-selenium
37
+
38
+ **Languages:** **English** · [Русский](README.ru.md)
39
+
40
+ Selenium integration built on top of [tquality-py-core](https://github.com/Tquality-ru/tquality-py-core).
41
+
42
+ ## Components
43
+
44
+ - **`SeleniumConfig`** — extension of `BaseConfig` with a `browser` selector
45
+ field and separate nested blocks `chrome`, `firefox`, `edge`, `safari`,
46
+ `undetected_chrome` (all blocks coexist), plus a nested `screencast`
47
+ block for step video recording.
48
+ - **`BrowserType`** — enum: `chrome`, `firefox`, `edge`, `safari`,
49
+ `undetected-chrome`. Per-OS availability is checked by `OSUtils` at
50
+ browser startup (with an immediate failure on mismatch).
51
+ - **`BaseElement`** and the typed subclasses `Button`, `Input`, `CheckBox`,
52
+ `Label` with a full surface: `click`, `text`, `get_attribute`,
53
+ `wait_until_*`, `js_actions` (lazily bound to the element).
54
+ - **`BaseForm`** — page base class with `title`, `current_url`,
55
+ `element_factory` (resolved via the composition root).
56
+ - **`SeleniumServices`** — composition root (a `dependency-injector`
57
+ container). Subclass it to add or replace any service.
58
+
59
+ ## Services
60
+
61
+ - **`BrowserService`** — `WebDriver` wrapper; parameters are taken from
62
+ `config.active_browser`.
63
+ - **`Waiter`**, **`ElementWaiter`** — explicit waits at the page and
64
+ element level.
65
+ - **`ElementFactory`** — element factory.
66
+ - **`JsActions`** + **`ElementJsActions`** — JavaScript actions on the
67
+ page and on individual elements.
68
+ - **`CollectionFactory`** — Pydantic-model collection factory backed by
69
+ the DOM (+ `DomField.css/xpath`).
70
+ - **`SeleniumScreenshotProvider`** — screenshots for steps at the
71
+ `CRITICAL` log level.
72
+ - **`SeleniumScreencastProvider`** — webm video recording (VP9 via
73
+ imageio-ffmpeg) for steps at `WITH_SCREENCAST`.
74
+
75
+ ## Requirements
76
+
77
+ - Python 3.12+
78
+ - Installed browsers (for tests against a real driver).
79
+
80
+ ## Installation
81
+
82
+ The package is published to [public PyPI](https://pypi.org/project/tquality-py-selenium/).
83
+ This is the recommended installation path for all consumers:
84
+
85
+ ```bash
86
+ pip install tquality-py-selenium
87
+ ```
88
+
89
+ or with [uv](https://docs.astral.sh/uv/):
90
+
91
+ ```bash
92
+ uv add tquality-py-selenium
93
+ ```
94
+
95
+ In the consumer's `pyproject.toml`:
96
+
97
+ ```toml
98
+ dependencies = [
99
+ "tquality-py-selenium>=0.1.4",
100
+ ]
101
+ ```
102
+
103
+ ### Alternative: install from the GitHub mirror
104
+
105
+ For a source build (for example, to verify a commit that has not yet
106
+ been released), the package is also available from the public GitHub
107
+ mirror by tag:
108
+
109
+ ```bash
110
+ uv pip install "tquality-py-selenium @ git+https://github.com/Tquality-ru/tquality-py-selenium.git@v0.1.4"
111
+ ```
112
+
113
+ In that case hatch on the consumer side requires explicit opt-in to
114
+ `direct-references`:
115
+
116
+ ```toml
117
+ [tool.hatch.metadata]
118
+ allow-direct-references = true
119
+ ```
120
+
121
+ ## Quick start
122
+
123
+ ```python
124
+ # conftest.py
125
+ import pytest
126
+ from tquality_selenium import SeleniumServices
127
+
128
+ # Composition root. config_dir defaults to the directory of this file,
129
+ # so config.json5 next to conftest.py is picked up regardless of the
130
+ # current working directory.
131
+ SeleniumServices.setup()
132
+
133
+
134
+ @pytest.fixture(autouse=True)
135
+ def browser():
136
+ SeleniumServices.browser()
137
+ yield
138
+ SeleniumServices.browser().quit()
139
+ SeleniumServices.browser.reset()
140
+ SeleniumServices.logger.reset()
141
+ ```
142
+
143
+ ```python
144
+ # pages/login_page.py
145
+ from tquality_selenium import BaseForm, By
146
+
147
+
148
+ class LoginPage(BaseForm):
149
+ def __init__(self) -> None:
150
+ self._username = self.element_factory.input(
151
+ By.id("username"), "Username",
152
+ )
153
+ self._password = self.element_factory.input(
154
+ By.id("password"), "Password",
155
+ )
156
+ self._submit = self.element_factory.button(
157
+ By.id("login-btn"), "Sign in",
158
+ )
159
+ super().__init__(unique_element=self._username, name="Login page")
160
+
161
+ def login(self, username: str, password: str) -> None:
162
+ self._username.type_text(username)
163
+ self._password.type_text(password)
164
+ self._submit.click()
165
+ ```
166
+
167
+ ```jsonc
168
+ // config.json5 — next to conftest.py
169
+ {
170
+ "$schema": "https://cdn.jsdelivr.net/gh/Tquality-ru/tquality-py-selenium@v0.1.4/schema/config.schema.json",
171
+
172
+ "base_url": "https://example.com",
173
+ "browser": "chrome",
174
+ "highlight_elements": true, // red outline during interactions
175
+
176
+ // All browsers are pre-configured — switching is a single line above.
177
+ "chrome": { "headless": true },
178
+ "firefox": { "headless": true },
179
+ "undetected_chrome": { "headless": false },
180
+
181
+ "screencast": {
182
+ "fps": 10,
183
+ "frame_interval": 0.1, // captures short UI states more often
184
+ },
185
+ }
186
+ ```
187
+
188
+ ## Extending via subclasses of `SeleniumServices`
189
+
190
+ To add custom services, subclass `SeleniumServices`. The scope is
191
+ defined by the `dependency-injector` provider type (and where it is
192
+ reset in fixtures):
193
+
194
+ | Scope | Provider | Lifetime |
195
+ | ---------------- | ----------------------------------------------------------------------- | -------------------------------------------------------------- |
196
+ | **global** | `providers.Singleton` | One instance per pytest process. |
197
+ | **session** | `providers.ContextLocalSingleton` + reset in a `scope="session"` fixture | One instance per session, reset on exit. |
198
+ | **test** | `providers.ContextLocalSingleton` + reset in an `autouse=True` fixture | A new instance per test. |
199
+ | **transient** | `providers.Factory` | A fresh instance on every `services.my_service()` call. |
200
+
201
+ ```python
202
+ # my_project/services.py
203
+ from dependency_injector import providers
204
+ from tquality_selenium import SeleniumServices
205
+
206
+ from my_project.clients import ApiClient, CurrentUser, TempDirFactory
207
+
208
+
209
+ class ProjectServices(SeleniumServices):
210
+ # Global: one API client per process.
211
+ api_client = providers.Singleton(ApiClient)
212
+
213
+ # Session: data shared across all tests of a single run.
214
+ session_data = providers.ContextLocalSingleton(SessionData)
215
+
216
+ # Test: fresh state per test.
217
+ current_user = providers.ContextLocalSingleton(CurrentUser)
218
+
219
+ # Transient: a fresh instance on every access.
220
+ temp_dir = providers.Factory(TempDirFactory)
221
+
222
+ # Replacing an existing service (referencing the parent's config):
223
+ # browser = providers.ContextLocalSingleton(
224
+ # MyBrowserService, config=SeleniumServices.config,
225
+ # )
226
+ ```
227
+
228
+ ```python
229
+ # conftest.py
230
+ import pytest
231
+
232
+ from my_project.services import ProjectServices
233
+
234
+ ProjectServices.setup()
235
+
236
+
237
+ @pytest.fixture(autouse=True)
238
+ def _reset_test_scoped_services():
239
+ """Test-scoped ContextLocalSingleton instances are reset after each test."""
240
+ yield
241
+ ProjectServices.current_user.reset()
242
+
243
+
244
+ @pytest.fixture(scope="session", autouse=True)
245
+ def _reset_session_scoped_services():
246
+ """Session-scoped ContextLocalSingleton instances are reset at the end of the pytest session."""
247
+ yield
248
+ ProjectServices.session_data.reset()
249
+
250
+
251
+ @pytest.fixture(autouse=True)
252
+ def browser():
253
+ ProjectServices.browser()
254
+ yield
255
+ ProjectServices.browser().quit()
256
+ ProjectServices.browser.reset()
257
+ ProjectServices.logger.reset()
258
+ ```
259
+
260
+ Resolving a service by type, without referencing the provider name —
261
+ useful inside elements and forms that don't see the concrete subclass:
262
+
263
+ ```python
264
+ from tquality_selenium import SeleniumServices
265
+ from my_project.clients import ApiClient
266
+
267
+ client = SeleniumServices.get_service(ApiClient)
268
+ ```
269
+
270
+ `get_service` goes to the active composition root (the one whose
271
+ `setup()` was called last), so providers replaced in a subclass are
272
+ resolved transparently.
273
+
274
+ ## Step video recording
275
+
276
+ ```python
277
+ from tquality_selenium import LogLevel, step
278
+
279
+
280
+ def login():
281
+ with step("Sign in", level=LogLevel.WITH_SCREENCAST):
282
+ ...
283
+ # An attached webm of the whole step is added to the allure report.
284
+ ```
285
+
286
+ Capture runs in a background thread with `contextvars.copy_context()`
287
+ so a second WebDriver session is not opened. The frame-capture
288
+ strategy is BiDi → CDP → classic `get_screenshot_as_png` (with a
289
+ warning on fallback).
290
+
291
+ ## Development
292
+
293
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
294
+
295
+ ## CI/CD
296
+
297
+ GitLab CI runs on every MR and on master:
298
+
299
+ - **`mypy`** — strict mode.
300
+ - **`tests:linux`** — pytest without real browsers.
301
+ - **`tests:linux-browsers-healthcheck`** — chrome, firefox, edge,
302
+ undetected-chrome on a Linux runner (uses the
303
+ `selenium/standalone-all-browsers` image which bakes in the browsers
304
+ and drivers).
305
+ - **`tests:macos-browsers-healthcheck`** — all 5 browsers (chrome, firefox,
306
+ edge, safari, undetected-chrome) on a macOS runner.
307
+ - **`tests:windows-browsers-healthcheck`** — chrome, firefox, edge,
308
+ undetected-chrome on a Windows runner.
309
+
310
+ On a git tag `vX.Y.Z`:
311
+
312
+ - **`publish-pypi`** — build (version derived from the tag via
313
+ `hatch-vcs`) and upload to public
314
+ [PyPI](https://pypi.org/project/tquality-py-selenium/). Requires the
315
+ `PYPI_TOKEN` variable in CI/CD settings (protected, masked).
316
+ - **`publish`** — duplicate publication to the GitLab Package Registry
317
+ (internal mirror).
318
+ - **`mirror-to-github`** — master and the tag are mirrored to
319
+ https://github.com/Tquality-ru/tquality-py-selenium (`feature/*`
320
+ branches are not copied to the mirror).
321
+
322
+ Version history lives in [CHANGELOG.md](CHANGELOG.md).
@@ -0,0 +1,32 @@
1
+ tquality_selenium/__init__.py,sha256=OwSEL99Sqp26bqtmOLelmWsai2qpFaMoTaVtOhQSavo,1449
2
+ tquality_selenium/browser.py,sha256=0FZhOqfgaN97nyTwPCvADw7jvXuvn_KgBde1IYEMHYo,12765
3
+ tquality_selenium/cli.py,sha256=pdtzX2cr5isTzWF5iI2CytMbFvteTr5QDxSLeUVk2RA,3851
4
+ tquality_selenium/config.py,sha256=vX39z5kEKw_nhGZwNzv6zLzm2p_BwG1_pUqTrHJAvnY,4708
5
+ tquality_selenium/container.py,sha256=tJXfcZgZLxiUQADH-IFlYEJDfpaKdrQLtEhrYj0X2-Y,8516
6
+ tquality_selenium/os_utils.py,sha256=9Vqa_JH-V0OTFtvUovMDicckhunqJcKEPqTKOq07Xds,1601
7
+ tquality_selenium/page_source_plugin.py,sha256=DeVdjekRqlgQL2Jl4MH-trJMRjDqmG4nIOYPl0Ykvu4,3551
8
+ tquality_selenium/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ tquality_selenium/schema.py,sha256=fAYu6idkJEJUHMbW3irdrj9-7d2E7BikGiEKxBNKtj0,2316
10
+ tquality_selenium/screencast_provider.py,sha256=7KMpntnPR66Pj8AHBkcI7PxtRZ6uAAdmbWVswgZgpEM,11260
11
+ tquality_selenium/screenshot_provider.py,sha256=oVt50WWdbwz3c6Fn-cefrWpMIdIy7XJCz8LMMHPv024,1041
12
+ tquality_selenium/elements/__init__.py,sha256=ZOzmCwpBNfBC-GyKGzBS7obEm9T68mcCroXGfVz614E,412
13
+ tquality_selenium/elements/base_element.py,sha256=zp1uKZx9FOhgYn966tML3TrInpj54xDWRZ9KTkMIXtA,5059
14
+ tquality_selenium/elements/button.py,sha256=KLAvIB2XdvnCOifr-GMDwo4LEE9I8gpAaNldvm_oBW4,444
15
+ tquality_selenium/elements/by.py,sha256=-1_BxWKcU4_Z6GPS8cBu61Ud3mKn4Q7vAIG5Hcyb_Ok,2096
16
+ tquality_selenium/elements/checkbox.py,sha256=kKBngadmnU4bUDw9gyda583M-dfVHcVtA7dP9ewsWcM,627
17
+ tquality_selenium/elements/input.py,sha256=D_yZOPwnZFNEsPDDjuorDFZ3sCYqdFxpG4z_kFrvOQA,1546
18
+ tquality_selenium/elements/label.py,sha256=UNFOopHl4enCYdTMJ0ti2kZlgHl_WTFFC4hbK2hRXlI,324
19
+ tquality_selenium/pages/__init__.py,sha256=YK5E_i3ghZvAn35J-M2egNJ-ACl-MtriJWziSgZwHjg,79
20
+ tquality_selenium/pages/base_form.py,sha256=dACLsJ5Chfp8Qq4Aymj_T2wE3NsUJZsYVmMVB-bT770,2044
21
+ tquality_selenium/services/__init__.py,sha256=gZqzGnZNkcqWrYsCGGZoS0gSR8GCB0Lc96kJUMh17mA,575
22
+ tquality_selenium/services/collection_factory.py,sha256=0tZ2_A9QGGf1YTSSSoRufBQB04iruS78g258JXR2SFE,7091
23
+ tquality_selenium/services/element_factory.py,sha256=Wnbi0k_6yyCpSABfLe6ojChbmoB0NfvnCdpgcNh9v5Y,1310
24
+ tquality_selenium/services/element_waiter.py,sha256=ZudVWErS8QP7Tp7XfoCbTWZLVKKsRQann5GjMmdK7_k,2020
25
+ tquality_selenium/services/js_actions.py,sha256=1kfz13APYpljdg-XPBJnGsDKBbHwN08BKaPBY21iNmg,6460
26
+ tquality_selenium/services/waiter.py,sha256=FohahGxc7bbu74PfnQEgVC8ZDCsma1Lxoelt9kAkxv4,1522
27
+ tquality_py_selenium-0.1.5.dist-info/METADATA,sha256=T9LWoDvUAFV0yzgOXL5C2HxBBz4nJYfCnFsMj09rr7U,11042
28
+ tquality_py_selenium-0.1.5.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
29
+ tquality_py_selenium-0.1.5.dist-info/entry_points.txt,sha256=S-rIuJh-xg7eL4u8-tWmbdVTspo_VuRkXvPsXcEImuE,153
30
+ tquality_py_selenium-0.1.5.dist-info/licenses/LICENSE,sha256=Zh74Q42FkXdtes3fwG83wTYUHimBH3SpqzdtANsFGrI,11310
31
+ tquality_py_selenium-0.1.5.dist-info/licenses/NOTICE,sha256=k_jKXKGBem2v-sA_vdd1uJ70-y8kR_wH-s0xgd3HXdU,225
32
+ tquality_py_selenium-0.1.5.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,5 @@
1
+ [console_scripts]
2
+ tquality-selenium-config = tquality_selenium.cli:main
3
+
4
+ [pytest11]
5
+ tquality_selenium_page_source = tquality_selenium.page_source_plugin
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for describing the origin of the Work and
141
+ reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Support. While redistributing the Work or
166
+ Derivative Works thereof, You may choose to offer, and charge a
167
+ fee for, acceptance of support, warranty, indemnity, or other
168
+ liability obligations and/or rights consistent with this License.
169
+ However, in accepting such obligations, You may act only on Your
170
+ own behalf and on Your sole responsibility, not on behalf of any
171
+ other Contributor, and only if You agree to indemnify, defend,
172
+ and hold each Contributor harmless for any liability incurred by,
173
+ or claims asserted against, such Contributor by reason of your
174
+ accepting any such warranty or support.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 ООО «Точка качества»
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,6 @@
1
+ tquality-py-selenium
2
+ Copyright 2026 ООО «Точка качества»
3
+
4
+ This product includes software developed by
5
+ ООО «Точка качества» (https://tquality.ru).
6
+ ssh user@host -t 'tmux attach -t mysession'
@@ -0,0 +1,69 @@
1
+ from tquality_core import (
2
+ BaseConfig,
3
+ Locator,
4
+ Logger,
5
+ LogLevel,
6
+ StringUtils,
7
+ step,
8
+ )
9
+
10
+ from tquality_selenium.browser import BrowserService
11
+ from tquality_selenium.config import BrowserType, SeleniumConfig
12
+ from tquality_selenium.container import SeleniumServices
13
+ from tquality_selenium.elements import (
14
+ BaseElement,
15
+ Button,
16
+ By,
17
+ ByKind,
18
+ CheckBox,
19
+ Input,
20
+ Label,
21
+ )
22
+ from tquality_selenium.os_utils import OSUtils
23
+ from tquality_selenium.pages import BaseForm
24
+ from tquality_selenium.screencast_provider import SeleniumScreencastProvider
25
+ from tquality_selenium.screenshot_provider import SeleniumScreenshotProvider
26
+ from tquality_selenium.services import (
27
+ CollectionFactory,
28
+ DomField,
29
+ ElementFactory,
30
+ ElementJsActions,
31
+ ElementWaiter,
32
+ JsActions,
33
+ PseudoElement,
34
+ Waiter,
35
+ )
36
+
37
+ __all__ = [
38
+ # Core re-exports
39
+ "BaseConfig",
40
+ "Locator",
41
+ "Logger",
42
+ "LogLevel",
43
+ "StringUtils",
44
+ "step",
45
+ # Selenium-specific
46
+ "BaseElement",
47
+ "BaseForm",
48
+ "BrowserService",
49
+ "BrowserType",
50
+ "Button",
51
+ "By",
52
+ "ByKind",
53
+ "CheckBox",
54
+ "CollectionFactory",
55
+ "DomField",
56
+ "ElementFactory",
57
+ "ElementJsActions",
58
+ "ElementWaiter",
59
+ "Input",
60
+ "JsActions",
61
+ "Label",
62
+ "OSUtils",
63
+ "PseudoElement",
64
+ "SeleniumConfig",
65
+ "SeleniumScreencastProvider",
66
+ "SeleniumScreenshotProvider",
67
+ "SeleniumServices",
68
+ "Waiter",
69
+ ]