pomcorn 0.9.1__py3-none-any.whl → 0.9.3__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.

Potentially problematic release.


This version of pomcorn might be problematic. Click here for more details.

pomcorn/element.py CHANGED
@@ -172,9 +172,9 @@ class PomcornElement(Generic[locators.TLocator]):
172
172
  counted.
173
173
 
174
174
  """
175
- cmd_ctrl = Keys.COMMAND
175
+ cmd_ctrl = Keys.CONTROL
176
176
  if sys.platform.lower() == "darwin":
177
- cmd_ctrl = Keys.CONTROL
177
+ cmd_ctrl = Keys.COMMAND
178
178
 
179
179
  self.send_keys(cmd_ctrl + "a", only_visible=only_visible)
180
180
  self.send_keys(Keys.BACK_SPACE, only_visible=only_visible)
@@ -124,7 +124,7 @@ class XPathLocator(Locator):
124
124
  self.related_query = query.lstrip(self.divider)
125
125
  super().__init__(by=By.XPATH, query=query)
126
126
 
127
- def __truediv__(self, other: XPathLocator) -> XPathLocator:
127
+ def __truediv__(self, other: XPathLocator | str) -> XPathLocator:
128
128
  """Override `/` operator to implement following XPath locators.
129
129
 
130
130
  "/" used to select the nearest children of the current node.
@@ -132,7 +132,7 @@ class XPathLocator(Locator):
132
132
  """
133
133
  return self.prepare_relative_locator(other=other, separator="/")
134
134
 
135
- def __floordiv__(self, other: XPathLocator) -> XPathLocator:
135
+ def __floordiv__(self, other: XPathLocator | str) -> XPathLocator:
136
136
  """Override `//` operator to implement nested XPath locators.
137
137
 
138
138
  "//" used to select all descendants (children, grandchildren,
@@ -261,7 +261,7 @@ class XPathLocator(Locator):
261
261
 
262
262
  def prepare_relative_locator(
263
263
  self,
264
- other: XPathLocator,
264
+ other: XPathLocator | str,
265
265
  separator: Literal["/", "//"] = "/",
266
266
  ) -> XPathLocator:
267
267
  """Prepare relative locator base on queries of two locators.
@@ -270,7 +270,7 @@ class XPathLocator(Locator):
270
270
  return only the filled one.
271
271
 
272
272
  Args:
273
- other: Child locator object.
273
+ other: Child locator object or str locator query.
274
274
  separator: Literal which will placed between locators queries - "/"
275
275
  used to select nearest children of current node and "//" used
276
276
  to select all descendants (children, grandchildren,
@@ -290,6 +290,8 @@ class XPathLocator(Locator):
290
290
  # //(//li)[3] -> invalid
291
291
  related_query = f"//{self.related_query}"
292
292
 
293
+ other = XPathLocator(other) if isinstance(other, str) else other
294
+
293
295
  locator = XPathLocator(
294
296
  query=f"{related_query}{separator}{other.related_query}",
295
297
  )
@@ -1,7 +1,8 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.1
2
2
  Name: pomcorn
3
- Version: 0.9.1
3
+ Version: 0.9.3
4
4
  Summary: Base implementation of Page Object Model
5
+ Home-page: https://pypi.org/project/pomcorn/
5
6
  License: MIT
6
7
  Keywords: python,selenium,webdriver,autotests,page object model,page object pattern,page object,pom,parsing,browser
7
8
  Author: Saritasa
@@ -17,11 +18,9 @@ Classifier: Operating System :: OS Independent
17
18
  Classifier: Programming Language :: Python :: 3
18
19
  Classifier: Programming Language :: Python :: 3.11
19
20
  Classifier: Programming Language :: Python :: 3.12
20
- Classifier: Programming Language :: Python :: 3.13
21
21
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
22
  Requires-Dist: selenium (>=4.12)
23
23
  Project-URL: Documentation, http://pomcorn.rtfd.io/
24
- Project-URL: Homepage, https://pypi.org/project/pomcorn/
25
24
  Project-URL: Repository, https://github.com/saritasa-nest/pomcorn/
26
25
  Description-Content-Type: text/markdown
27
26
 
@@ -67,7 +66,7 @@ The package includes next base classes to create Page Object Model (``POM``) pag
67
66
 
68
67
  ```
69
68
 
70
- It also includes [classes to locate elements](https://pomcorn.readthedocs.io/en/latest/locators.html) on the web page and a number of additional [waiting conditions](https://pomcorn.readthedocs.io/en/latest/waits_conditions.html>).
69
+ It also includes [classes to locate elements](https://pomcorn.readthedocs.io/en/latest/locators.html) on the web page and a number of additional [waiting conditions](https://pomcorn.readthedocs.io/en/latest/waits_conditions.html).
71
70
 
72
71
  ## Installation
73
72
 
@@ -2,15 +2,15 @@ pomcorn/__init__.py,sha256=gB9I-SXauMrhxQlvZmFgh_htHqUXjII6tvQmtJEU5Ks,318
2
2
  pomcorn/component.py,sha256=t1GARAI0cW5ubfv1hurxpD_2KFyFxvfzxVADtwcRhiE,12161
3
3
  pomcorn/descriptors/__init__.py,sha256=5q_d5GtcaFlIIyHdsUnE9UNbz3g40qJCHKNaWGvcC6s,72
4
4
  pomcorn/descriptors/element.py,sha256=jSYxEUqKdAIEHf_zL9m6udyO4QDR22Ivm37BOa-tdKc,4486
5
- pomcorn/element.py,sha256=_4jxmhBB5g8ztwGQoaPvrv3p9lCJwYo7m59EXbmlpdc,12214
5
+ pomcorn/element.py,sha256=Tf09Ifhlfd9OvlhYBT4C5tG6UeMdFi5NAThROUmzlpM,12214
6
6
  pomcorn/locators/__init__.py,sha256=eWAnv28EGwzF-NQTeB4jc-T3B3a0gMbBIiR4IbmTo1Q,760
7
- pomcorn/locators/base_locators.py,sha256=j5PpHevQrhuRFUEd21ABZkCg1sJWY1BTXCmuzWTaOE0,9746
7
+ pomcorn/locators/base_locators.py,sha256=xqJzCri0SatLGnk-oUVzrliwySvPWmaJCCEIDOwsO5Q,9859
8
8
  pomcorn/locators/xpath_locators.py,sha256=zcGNIk5HX36TTauCApgX0csdobWj8QFZ_td4-9qkTgU,7461
9
9
  pomcorn/page.py,sha256=AJLXffI6GFP6XN3vhoGGrUknzvJZzP6GBP7BLaGumX0,5824
10
10
  pomcorn/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  pomcorn/waits_conditions.py,sha256=E8sLfBvIV2EO91Mm5KyKXB5IGEB9gUWza3XPE4_aCQE,3528
12
12
  pomcorn/web_view.py,sha256=qt3Gpr9BMtV0tLp5sLlleSEqweh2PphHXlT02awf9SE,13585
13
- pomcorn-0.9.1.dist-info/LICENSE,sha256=1vmhQNp1dDH8ksJ199LuG4oKz5D4ZvNccPcFckiG2S4,1091
14
- pomcorn-0.9.1.dist-info/METADATA,sha256=ZlE23C86mMcKiHV6GCsGrSrCpuvJ9QeWJczdfVfnkPM,5892
15
- pomcorn-0.9.1.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
16
- pomcorn-0.9.1.dist-info/RECORD,,
13
+ pomcorn-0.9.3.dist-info/LICENSE,sha256=1vmhQNp1dDH8ksJ199LuG4oKz5D4ZvNccPcFckiG2S4,1091
14
+ pomcorn-0.9.3.dist-info/METADATA,sha256=pvo2-uibArCCzFZBxCoM4YkOyNCpgKGXcvRg8_5CdUk,5828
15
+ pomcorn-0.9.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
16
+ pomcorn-0.9.3.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.2
2
+ Generator: poetry-core 1.9.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any