robotframework-appiumwindows 0.1.5__py3-none-any.whl → 0.1.6__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.
@@ -510,9 +510,46 @@ class _ElementKeywords(KeywordGroup):
510
510
 
511
511
  # TODO temporary add, will remove in the future
512
512
  def appium_click_until(self, locators: list, timeout=None, handle_error=True):
513
- return self.appium_click_first_match(locators=locators, timeout=timeout, handle_error=handle_error)
513
+ """
514
+ Click any element in the list of locators until all elements are not found.
515
+
516
+ Args:
517
+ locators: List of locators to try in order.
518
+ timeout: Maximum time to wait for an element to appear (default: None).
519
+ handle_error: Whether to handle errors (default: True).
520
+ """
521
+ self._info(f"Appium Click Until: locators='{locators}', timeout='{timeout}', handle_error='{handle_error}'")
522
+
523
+ def func():
524
+ found = False
525
+ for locator in locators:
526
+ element = self._element_find(locator, True, False)
527
+ if element:
528
+ element.click()
529
+ found = True
530
+
531
+ if not found:
532
+ return False
533
+ raise Exception(f"Still found element in {locators}, retrying...")
534
+
535
+ return self._retry(
536
+ timeout,
537
+ func,
538
+ action=f"Click until '{locators}'",
539
+ required=not handle_error,
540
+ return_value=False,
541
+ poll_interval=None
542
+ )
514
543
 
515
544
  def appium_click_first_match(self, locators: list, timeout=None, handle_error=True):
545
+ """
546
+ Click the first element in the list of locators that appears.
547
+
548
+ Args:
549
+ locators: List of locators to try in order.
550
+ timeout: Maximum time to wait for an element to appear (default: None).
551
+ handle_error: Whether to handle errors (default: True).
552
+ """
516
553
  self._info(f"Appium Click First Match: locators='{locators}', timeout='{timeout}', handle_error='{handle_error}'")
517
554
 
518
555
  def func():
@@ -533,6 +570,7 @@ class _ElementKeywords(KeywordGroup):
533
570
  func,
534
571
  action=f"Click until '{locators}'",
535
572
  required=not handle_error,
573
+ return_value=False,
536
574
  poll_interval=None
537
575
  )
538
576
 
@@ -1183,7 +1221,7 @@ class _ElementKeywords(KeywordGroup):
1183
1221
 
1184
1222
  time.sleep(poll)
1185
1223
 
1186
- if self._log_level in self.LOG_LEVEL_DEBUG:
1224
+ if self._log_level == 'DEBUG':
1187
1225
  duration = time.time() - start
1188
1226
  self._debug(f"_retry duration for action '{action}': {duration:.2f}s")
1189
1227
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: robotframework-appiumwindows
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Robot Framework AppiumLibrary extension for Windows desktop automation using NovaWindows2 Driver instead of WinAppDriver.
5
5
  Author-email: Huy Nguyen <nguyenvanhuy0612@gmail.com>
6
6
  License: MIT
@@ -3,7 +3,7 @@ AppiumLibrary/appium_path.py,sha256=fAsq8pY-Rknqxph0SS4qYQvZSvzKif5PV9XE9uz5Myw,
3
3
  AppiumLibrary/version.py,sha256=tiPfWbcvAi_f_6m9SWjLspGk6wtLrLIYPpARm5C07o4,41
4
4
  AppiumLibrary/keywords/__init__.py,sha256=j9ug8IsxoltsFwiYMvuk1lGWPzJdmrrG9btcmjgFYIE,746
5
5
  AppiumLibrary/keywords/_applicationmanagement.py,sha256=J0rDv8neQwX4tnmR7QdbfPPF9BxVyyq-hyK5gGzsuwk,22682
6
- AppiumLibrary/keywords/_element.py,sha256=AYZT9l8dditffpjbuYjN1edWSiwgmGnJICp8KZqAlHI,54872
6
+ AppiumLibrary/keywords/_element.py,sha256=QY-ASpNGrijOyXwku4FHHUHoa9ISNehtY86chQz9pjY,56159
7
7
  AppiumLibrary/keywords/_logging.py,sha256=07VoC1CYkCBWeEBeay-kpBHhES-uIb5g6_B7kXf1IHI,1864
8
8
  AppiumLibrary/keywords/_powershell.py,sha256=dFz_LVbewZ3F3RzDwk4Py8BMSm05XnpojczcYJ2eiaQ,24151
9
9
  AppiumLibrary/keywords/_runonfailure.py,sha256=dsy0qAyvoRFbnLy1lZgwadnFrKoFRh8hwTmRHocoz40,2847
@@ -16,8 +16,8 @@ AppiumLibrary/locators/__init__.py,sha256=XtTYoS3PKdGSjZIR7fvaaK-ExaOh8ZWW2dddNB
16
16
  AppiumLibrary/locators/elementfinder.py,sha256=acwAJ2OJsN59yJ5201UH5GdRgWJIzEj5Cc-xCgHTJW8,10977
17
17
  AppiumLibrary/utils/__init__.py,sha256=kFiEGeyc2IJVA1nUx2DezPkkO7HWTDnoL__gW4nRRlw,1572
18
18
  AppiumLibrary/utils/applicationcache.py,sha256=YrRQgz-4d77hToib4ApBjFT5VohO65DMNiNVUr_PI_0,1523
19
- robotframework_appiumwindows-0.1.5.dist-info/licenses/LICENSE,sha256=0usw_6IO4DLz-QIR_RLmRq9n4JX_Yns3Ew6dO-2FQmc,1070
20
- robotframework_appiumwindows-0.1.5.dist-info/METADATA,sha256=N4ZMjw44NMiOobLzcPBimjY-YO0R7ERbRR41MzOP-HM,10256
21
- robotframework_appiumwindows-0.1.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
22
- robotframework_appiumwindows-0.1.5.dist-info/top_level.txt,sha256=2o2iQDagXnzsewODgcttx95vTzvaYaZB7q6KJB8sf-I,14
23
- robotframework_appiumwindows-0.1.5.dist-info/RECORD,,
19
+ robotframework_appiumwindows-0.1.6.dist-info/licenses/LICENSE,sha256=0usw_6IO4DLz-QIR_RLmRq9n4JX_Yns3Ew6dO-2FQmc,1070
20
+ robotframework_appiumwindows-0.1.6.dist-info/METADATA,sha256=s2sT6_7GhIHMtZVkitHeRx2eaQ484U4zo3Xc9LVK5GU,10256
21
+ robotframework_appiumwindows-0.1.6.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
22
+ robotframework_appiumwindows-0.1.6.dist-info/top_level.txt,sha256=2o2iQDagXnzsewODgcttx95vTzvaYaZB7q6KJB8sf-I,14
23
+ robotframework_appiumwindows-0.1.6.dist-info/RECORD,,