robotframework-browserpom 0.7.0__tar.gz → 0.8.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.
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/uiobject.py +17 -0
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/PKG-INFO +2 -2
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/pyproject.toml +3 -3
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/.gitignore +0 -0
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/__init__.py +0 -0
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/addons/filter_locator.js +0 -0
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/cli/__init__.py +0 -0
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/cli/__main__.py +0 -0
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/cli/cli.py +0 -0
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/cli/config.py +0 -0
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/cli/exceptions.py +0 -0
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/cli/formatting.py +0 -0
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/cli/scanner.py +0 -0
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/decorator.py +0 -0
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/pageobject.py +0 -0
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/pom_stubs.py +0 -0
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/LICENSE +0 -0
- {robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/readme.md +0 -0
|
@@ -7,6 +7,8 @@ from typing import TYPE_CHECKING, Self, cast
|
|
|
7
7
|
from robot.libraries.BuiltIn import BuiltIn
|
|
8
8
|
|
|
9
9
|
if TYPE_CHECKING:
|
|
10
|
+
from collections.abc import Iterator
|
|
11
|
+
|
|
10
12
|
from Browser import Browser
|
|
11
13
|
|
|
12
14
|
|
|
@@ -40,6 +42,10 @@ class UIObject:
|
|
|
40
42
|
"""
|
|
41
43
|
return cast("Browser", BuiltIn().get_library_instance("BrowserPOM"))
|
|
42
44
|
|
|
45
|
+
def __contains__(self, item: object) -> bool:
|
|
46
|
+
"""Reject membership tests without falling back to indexed iteration."""
|
|
47
|
+
raise TypeError(f"'{type(self).__name__}' object does not support membership tests")
|
|
48
|
+
|
|
43
49
|
def __getitem__(self, index: int | str) -> Self:
|
|
44
50
|
"""Retrieves an indexed or text-based child UI object.
|
|
45
51
|
|
|
@@ -58,6 +64,17 @@ class UIObject:
|
|
|
58
64
|
return self.filter(f"hasText: '{index}'")
|
|
59
65
|
raise TypeError("Index must be an int or a str.")
|
|
60
66
|
|
|
67
|
+
def __iter__(self) -> Iterator[Self]:
|
|
68
|
+
"""Yield indexed UIObjects for the matches present when iteration begins.
|
|
69
|
+
|
|
70
|
+
Count matches once using the complete locator, including parents. Each
|
|
71
|
+
result behaves like integer indexing: its locator follows the current
|
|
72
|
+
position if the DOM changes. A new iteration queries the count again.
|
|
73
|
+
"""
|
|
74
|
+
count = self.browser.get_element_count(str(self))
|
|
75
|
+
for index in range(count):
|
|
76
|
+
yield self[index]
|
|
77
|
+
|
|
61
78
|
def filter(self, filter_text: str) -> Self:
|
|
62
79
|
"""Filters the UI object by a given filter.
|
|
63
80
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: robotframework-browserpom
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: robotframework-browser library extension to create Page Objects
|
|
5
5
|
Author-email: Hasan Alp Zengin <hasanalpzengin@gmail.com>
|
|
6
6
|
License-File: LICENSE
|
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
13
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
14
14
|
Classifier: Topic :: Software Development :: Testing
|
|
15
|
-
Requires-Python: <4.0,>=3.
|
|
15
|
+
Requires-Python: <4.0,>=3.10
|
|
16
16
|
Requires-Dist: robotframework-browser
|
|
17
17
|
Requires-Dist: robotframework>=5.1.0
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "robotframework-browserpom"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.8.0"
|
|
4
4
|
description = "robotframework-browser library extension to create Page Objects"
|
|
5
5
|
authors = [{ name = "Hasan Alp Zengin", email = "hasanalpzengin@gmail.com" }]
|
|
6
|
-
requires-python = ">=3.
|
|
6
|
+
requires-python = ">=3.10,<4.0"
|
|
7
7
|
readme = "readme.md"
|
|
8
8
|
classifiers = [
|
|
9
9
|
"Programming Language :: Python :: 3",
|
|
@@ -31,7 +31,7 @@ test = [
|
|
|
31
31
|
"pytest>=8.4.2",
|
|
32
32
|
"pytest_robotframework>=4.3.0,<5",
|
|
33
33
|
"ruff>=0.11.0,<0.12",
|
|
34
|
-
"robotframework-browser-batteries
|
|
34
|
+
"robotframework-browser-batteries==20.1.0",
|
|
35
35
|
]
|
|
36
36
|
dev = [
|
|
37
37
|
"hatchling",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/cli/__init__.py
RENAMED
|
File without changes
|
{robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/cli/__main__.py
RENAMED
|
File without changes
|
|
File without changes
|
{robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/cli/config.py
RENAMED
|
File without changes
|
{robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/cli/exceptions.py
RENAMED
|
File without changes
|
{robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/cli/formatting.py
RENAMED
|
File without changes
|
{robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/cli/scanner.py
RENAMED
|
File without changes
|
|
File without changes
|
{robotframework_browserpom-0.7.0 → robotframework_browserpom-0.8.0}/BrowserPOM/pageobject.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|