robotframework-platynui 0.13.0.dev301__py3-none-any.whl → 0.14.0.dev0__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.
@@ -819,6 +819,25 @@ class BareMetal(OurDynamicCore):
819
819
  | `Pointer Click` //Button[@Name="Save" and @IsVisible=true()] # named *and* visible
820
820
  | `Pointer Click` //Button[@Name="OK" or @Name="Yes"] # either label
821
821
 
822
+ Matches come in document order: the order in which you meet the elements reading the tree from
823
+ the top, each element before its children. A keyword that needs one element acts on the first.
824
+
825
+ A position counts within its own step, once for every element the step starts from.
826
+ ``//Button[2]`` matches every button that is the second button of its parent — possibly several
827
+ — while ``(//Button)[2]`` is the second button of the whole search. Put the search in parentheses
828
+ whenever you mean "the n-th match":
829
+
830
+ | `Pointer Click` (//Button)[2] # the second button of all
831
+ | @{seconds}= `Query` //Button[2] # the second button of every parent
832
+
833
+ The same parentheses help when you pick a child by position below a container that you know is
834
+ unique. ``.//Table[@Name="Orders"]/*[544]`` has to rule out another *Orders* table nested in one
835
+ of the 543 cells before the one you want, whose cells would come first, so it looks inside each
836
+ of them. ``(.//Table[@Name="Orders"])[1]/*[544]`` stops at the first table, and only counts its
837
+ cells:
838
+
839
+ | `Get Attribute Value` (.//Table[@Name="Orders"])[1]/*[544] Name
840
+
822
841
  == Narrowing the search ==
823
842
 
824
843
  A bare ``//`` is quick to write, but it searches the *whole desktop*: ``//Edit[@Name="Street"]``
PlatynUI/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.13.0-dev.301'
1
+ __version__ = '0.14.0-dev.0'
PlatynUI/core/locator.py CHANGED
@@ -329,6 +329,13 @@ class Locator:
329
329
  ``use_default_prefix`` is true. ``default_attribute_namespace``
330
330
  names the namespace used for bare-string keys in
331
331
  `attributes`.
332
+
333
+ On the ``descendants`` scope, a locator with an ``index``, a
334
+ ``position`` or custom predicates renders one ``descendant::``
335
+ step, such as ``descendant::Button[2]``: it counts over all
336
+ descendants of the parent in document order, while
337
+ ``.//Button[2]`` would count per parent. Other locators render
338
+ ``.//``.
332
339
  """
333
340
  if self.path is not None:
334
341
  return self.path
@@ -368,6 +375,10 @@ class Locator:
368
375
  if scope is None:
369
376
  scope = 'children' if parent_is_root_like else 'descendants'
370
377
  axis_prefix = _XPATH_AXIS[scope]
378
+ # A custom predicate may count positions as well.
379
+ counts = self.index is not None or self.position is not None or any(self.custom_attributes)
380
+ if scope == 'descendants' and counts:
381
+ axis_prefix = 'descendant::'
371
382
 
372
383
  result = axis_prefix + node_name
373
384
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: robotframework-PlatynUI
3
- Version: 0.13.0.dev301
3
+ Version: 0.14.0.dev0
4
4
  Summary: Cross-platform UI automation toolkit for Robot Framework with XPath-based element selection
5
5
  Keywords: robotframework,automation,testing,ui,xpath,cross-platform
6
6
  Author: Daniel Biehl
@@ -17,16 +17,16 @@ Classifier: Topic :: Software Development :: Quality Assurance
17
17
  Classifier: Framework :: Robot Framework
18
18
  Classifier: Framework :: Robot Framework :: Library
19
19
  Requires-Dist: robotframework>=7.0.0
20
- Requires-Dist: platynui-native==0.13.0.dev301
20
+ Requires-Dist: platynui-native==0.14.0.dev0
21
21
  Requires-Dist: typing-extensions
22
22
  Requires-Dist: robotframework-pythonlibcore>=4.4.0
23
23
  Requires-Dist: robotframework-assertion-engine>=3.0.0
24
- Requires-Dist: platynui-cli==0.13.0.dev301 ; extra == 'all'
25
- Requires-Dist: platynui-inspector==0.13.0.dev301 ; extra == 'all'
26
- Requires-Dist: platynui-provider-java==0.13.0.dev301 ; extra == 'all'
27
- Requires-Dist: platynui-cli==0.13.0.dev301 ; extra == 'cli'
28
- Requires-Dist: platynui-inspector==0.13.0.dev301 ; extra == 'inspector'
29
- Requires-Dist: platynui-provider-java==0.13.0.dev301 ; extra == 'java'
24
+ Requires-Dist: platynui-cli==0.14.0.dev0 ; extra == 'all'
25
+ Requires-Dist: platynui-inspector==0.14.0.dev0 ; extra == 'all'
26
+ Requires-Dist: platynui-provider-java==0.14.0.dev0 ; extra == 'all'
27
+ Requires-Dist: platynui-cli==0.14.0.dev0 ; extra == 'cli'
28
+ Requires-Dist: platynui-inspector==0.14.0.dev0 ; extra == 'inspector'
29
+ Requires-Dist: platynui-provider-java==0.14.0.dev0 ; extra == 'java'
30
30
  Maintainer: Daniel Biehl
31
31
  Maintainer-email: Daniel Biehl <daniel.biehl@imbus.de>
32
32
  Requires-Python: >=3.12
@@ -1,6 +1,6 @@
1
- PlatynUI/BareMetal/__init__.py,sha256=XyfTmHFlRYo4g3JEPA04V2Jjk1SZwo6ON3iVR5XIa20,163875
1
+ PlatynUI/BareMetal/__init__.py,sha256=7Na9-otuoFYhzLC5u2v59idRf2duRuhdBC52YATdk2A,165051
2
2
  PlatynUI/__init__.py,sha256=qwkz7rK7LKfKfO5U0iFQMWrhBhIUSxuI8h5cYyQHjt4,958
3
- PlatynUI/__version__.py,sha256=Tc2MZB-jiYKlBD26dyFqGU4EcDa4YLpYm5DwcHHQ43A,31
3
+ PlatynUI/__version__.py,sha256=rS9OKWef4Gij74LRlwOjJwqr3F8hKWYUUvvn_rPdF_U,29
4
4
  PlatynUI/_assertable.py,sha256=H9kKa1l9jMjI-Lbnurpe86wkdoBC7MSEAIalVu14Gv8,5148
5
5
  PlatynUI/_our_libcore.py,sha256=xFQhJur_xlbnVEfnRuEsnZ9ReXD5YQ8eZhbVBPBaJ0Y,1572
6
6
  PlatynUI/core/__init__.py,sha256=KgPUor1FwUlF6ySfx1jE0MurwLaAcrTcCEEe3-vcrwk,3326
@@ -16,7 +16,7 @@ PlatynUI/core/descriptor.py,sha256=Gh5GVOl53BK4Y5eiiCxxdrszoqbzVf5iYtWH56zobDg,6
16
16
  PlatynUI/core/devices.py,sha256=ag-PESGrhvXHqE6xg_GiDxuST5clifWEv0nwoGp6nX4,15659
17
17
  PlatynUI/core/ensure.py,sha256=2CTX-guVGvBEYCFYyRHs65Sjn7rdp8Qj93-pVx2xrnk,7010
18
18
  PlatynUI/core/exceptions.py,sha256=lWVMN_b1uUSk-1CYhyCyZlyKWHaYCjhcdIfn1VKDK_A,3509
19
- PlatynUI/core/locator.py,sha256=XpE6HqeVxR_sty-toR7a4FrfIVr82B71GOHsmJhrZ6Q,22494
19
+ PlatynUI/core/locator.py,sha256=6Wg_1jEO4fvQBVFkvNvdYojczgQjcz95B_D1YhGWEIY,23111
20
20
  PlatynUI/core/native_logging.py,sha256=-Mq_ELdMLJVjoIyQlKNOQmuDdgQjzkJzJljaX8eCYhE,4661
21
21
  PlatynUI/core/patterns/__init__.py,sha256=FmxzslVAVZgLE9UvVjDhX6OTMTP8M2IBbbf2BJrdUD4,1897
22
22
  PlatynUI/core/patterns/activation.py,sha256=Wov0yGRWptBOqkNz_swca2W4SRxCYEdkampBtQq_s-s,960
@@ -71,6 +71,6 @@ PlatynUI/ui/tabs.py,sha256=zRPRLeJ1osMPLGCwJ95o8TyuI3Wnv04CrSdtIRWZy7I,537
71
71
  PlatynUI/ui/text.py,sha256=zeTfCJn-NxjChfxp8oTgeSCGxnQwRqt6-WzoF3x1VuY,2645
72
72
  PlatynUI/ui/tree.py,sha256=4pX5euln77tXGDGt-CTsxnPm-TQCjqoumf2iGCycL34,3728
73
73
  PlatynUI/ui/window.py,sha256=-swRZD4M-5HPy-MHb-bb9_HrVkR5e7xuMZlHsonYbbM,5811
74
- robotframework_platynui-0.13.0.dev301.dist-info/WHEEL,sha256=VOHKyukui3UMeyUkkBf5F7N5xN_6X6W7zHVvalNVVvI,81
75
- robotframework_platynui-0.13.0.dev301.dist-info/METADATA,sha256=LCFHdGyjPCvEBgNk8VF4vGYTflKCVFcRTeZqQFw7N1E,11961
76
- robotframework_platynui-0.13.0.dev301.dist-info/RECORD,,
74
+ robotframework_platynui-0.14.0.dev0.dist-info/WHEEL,sha256=-gI5GRFdiNNn2CFz-ptlExISMINC-k8bFxeojAlHbrM,81
75
+ robotframework_platynui-0.14.0.dev0.dist-info/METADATA,sha256=WkHEnSqz13aHRjI1gN72SIjd5FiQqspwD9VPayrBrKs,11945
76
+ robotframework_platynui-0.14.0.dev0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.12.21
2
+ Generator: uv 0.13.10
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any