AltTester-Driver 2.1.1__tar.gz → 2.1.2__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.
Files changed (110) hide show
  1. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/AltTester_Driver.egg-info/PKG-INFO +1 -1
  2. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/PKG-INFO +1 -1
  3. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/__init__.py +1 -1
  4. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/__version__.py +2 -2
  5. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/_websocket.py +1 -1
  6. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/altdriver.py +21 -11
  7. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/altobject.py +8 -3
  8. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/by.py +1 -1
  9. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/AltTesterCommands/__init__.py +1 -1
  10. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/AltTesterCommands/add_notification_listener.py +1 -1
  11. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/AltTesterCommands/remove_notification_listener.py +3 -2
  12. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/AltTesterCommands/reset_input.py +1 -1
  13. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/AltTesterCommands/set_server_logging.py +1 -1
  14. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/FindObjects/__init__.py +1 -1
  15. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/FindObjects/find_object.py +1 -1
  16. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/FindObjects/find_object_at_coordinates.py +1 -1
  17. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/FindObjects/find_object_which_contains.py +1 -1
  18. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/FindObjects/find_objects.py +1 -1
  19. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/FindObjects/find_objects_which_contains.py +1 -1
  20. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/FindObjects/wait_for_component_property.py +10 -3
  21. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/FindObjects/wait_for_object.py +3 -2
  22. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/FindObjects/wait_for_object_to_not_be_present.py +3 -2
  23. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/FindObjects/wait_for_object_which_contains.py +3 -2
  24. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/InputActions/__init__.py +1 -1
  25. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/InputActions/begin_touch.py +1 -1
  26. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/InputActions/click_coordinates.py +1 -1
  27. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/InputActions/end_touch.py +1 -1
  28. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/InputActions/keys_down.py +2 -2
  29. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/InputActions/keys_up.py +2 -2
  30. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/InputActions/move_mouse.py +1 -1
  31. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/InputActions/move_touch.py +1 -1
  32. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/InputActions/multi_point_swipe.py +1 -1
  33. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/InputActions/press_keys.py +2 -2
  34. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/InputActions/scroll_mouse.py +1 -1
  35. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/InputActions/swipe.py +1 -1
  36. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/InputActions/tap_coordinates.py +1 -1
  37. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/InputActions/tilt.py +1 -1
  38. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/Notifications/__init__.py +1 -1
  39. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/Notifications/base_notification_callbacks.py +1 -1
  40. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/Notifications/load_scene_mode.py +1 -1
  41. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/Notifications/load_scene_notification_result.py +1 -1
  42. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/Notifications/log_notification_result.py +1 -1
  43. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/Notifications/notification_type.py +1 -1
  44. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/ObjectCommands/__init__.py +1 -1
  45. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/ObjectCommands/call_method.py +1 -1
  46. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/ObjectCommands/click_element.py +1 -1
  47. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/ObjectCommands/get_all_components.py +1 -1
  48. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/ObjectCommands/get_component_property.py +1 -1
  49. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/ObjectCommands/get_text.py +1 -1
  50. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/ObjectCommands/pointer_down.py +1 -1
  51. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/ObjectCommands/pointer_enter.py +1 -1
  52. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/ObjectCommands/pointer_exit.py +1 -1
  53. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/ObjectCommands/pointer_up.py +1 -1
  54. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/ObjectCommands/set_component_property.py +1 -1
  55. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/ObjectCommands/set_text.py +1 -1
  56. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/ObjectCommands/tap_element.py +1 -1
  57. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/UnityCommands/__init__.py +1 -1
  58. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/UnityCommands/delete_player_pref.py +1 -1
  59. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/UnityCommands/delete_player_pref_key.py +1 -1
  60. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/UnityCommands/get_all_loaded_scenes.py +1 -1
  61. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/UnityCommands/get_current_scene.py +1 -1
  62. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/UnityCommands/get_player_pref_key.py +1 -1
  63. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/UnityCommands/get_time_scale.py +1 -1
  64. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/UnityCommands/load_scene.py +1 -1
  65. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/UnityCommands/set_player_pref_key.py +1 -1
  66. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/UnityCommands/set_time_scale.py +1 -1
  67. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/UnityCommands/unload_scene.py +1 -1
  68. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/UnityCommands/wait_for_current_scene_to_be.py +3 -2
  69. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/__init__.py +1 -1
  70. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/base_command.py +24 -11
  71. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/get_png_screenshot.py +1 -1
  72. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/get_server_version.py +1 -1
  73. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/get_static_property.py +1 -1
  74. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/commands/set_static_property.py +1 -1
  75. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/exceptions.py +5 -1
  76. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/keycode.py +1 -1
  77. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/logging.py +1 -1
  78. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/playerpref.py +1 -1
  79. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/alttester/reverse_port_forwarding.py +20 -5
  80. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/setup.py +1 -1
  81. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/integration/__init__.py +1 -1
  82. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/integration/conftest.py +7 -7
  83. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/integration/test_driver.py +39 -36
  84. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/integration/test_notifications.py +21 -20
  85. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/integration/test_reverse_port_forwarding.py +8 -8
  86. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/integration/test_scene01_part1.py +114 -89
  87. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/integration/test_scene01_part2.py +110 -109
  88. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/integration/test_scene02.py +18 -18
  89. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/integration/test_scene03.py +18 -18
  90. alttester_driver-2.1.2/tests/integration/test_scene05.py +145 -0
  91. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/integration/test_scene07.py +33 -26
  92. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/integration/test_scene09.py +14 -11
  93. alttester_driver-2.1.2/tests/integration/test_scene10.py +122 -0
  94. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/integration/utils.py +1 -1
  95. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/unit/__init__.py +1 -1
  96. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/unit/test_altobject.py +3 -2
  97. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/unit/test_commands.py +3 -2
  98. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/tests/unit/test_websocket.py +7 -4
  99. alttester_driver-2.1.1/tests/integration/test_scene05.py +0 -131
  100. alttester_driver-2.1.1/tests/integration/test_scene10.py +0 -110
  101. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/AltTester_Driver.egg-info/SOURCES.txt +0 -0
  102. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/AltTester_Driver.egg-info/dependency_links.txt +0 -0
  103. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/AltTester_Driver.egg-info/not-zip-safe +0 -0
  104. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/AltTester_Driver.egg-info/requires.txt +0 -0
  105. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/AltTester_Driver.egg-info/top_level.txt +0 -0
  106. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/MANIFEST.in +0 -0
  107. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/README.md +0 -0
  108. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/requirements-dev.txt +0 -0
  109. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/requirements.txt +0 -0
  110. {alttester_driver-2.1.1 → alttester_driver-2.1.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: AltTester-Driver
3
- Version: 2.1.1
3
+ Version: 2.1.2
4
4
  Summary: Python bindings for the AltTester® framework. AltTester® is an open-source UI driven test automation tool that helps you find objects in your game and interacts with them.
5
5
  Home-page: https://alttester.com/docs/sdk/latest/
6
6
  Author: Altom Consulting
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: AltTester-Driver
3
- Version: 2.1.1
3
+ Version: 2.1.2
4
4
  Summary: Python bindings for the AltTester® framework. AltTester® is an open-source UI driven test automation tool that helps you find objects in your game and interacts with them.
5
5
  Home-page: https://alttester.com/docs/sdk/latest/
6
6
  Author: Altom Consulting
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -15,4 +15,4 @@
15
15
  along with this program. If not, see <https://www.gnu.org/licenses/>.
16
16
  """
17
17
 
18
- VERSION = "2.1.1"
18
+ VERSION = "2.1.2"
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -28,7 +28,8 @@ from alttester.altobject import AltObject
28
28
  from alttester.by import By
29
29
 
30
30
 
31
- warnings.filterwarnings("default", category=DeprecationWarning, module=__name__)
31
+ warnings.filterwarnings(
32
+ "default", category=DeprecationWarning, module=__name__)
32
33
 
33
34
 
34
35
  class AltDriver:
@@ -116,7 +117,8 @@ class AltDriver:
116
117
  logger.configure(
117
118
  handlers=[
118
119
  dict(sink=sys.stdout, diagnose=False),
119
- dict(sink="./AltTester.log", enqueue=False, serialize=True, mode="w", diagnose=False),
120
+ dict(sink="./AltTester.log", enqueue=False,
121
+ serialize=True, mode="w", diagnose=False),
120
122
  ],
121
123
  levels=[dict(name="DEBUG")],
122
124
  activation=[("alttester", True)],
@@ -131,7 +133,8 @@ class AltDriver:
131
133
 
132
134
  def _check_server_version(self):
133
135
  server_version = commands.GetServerVersion.run(self._connection)
134
- logger.info("Connection established with instrumented Unity app. AltTester(R) Version: {}", server_version)
136
+ logger.info(
137
+ "Connection established with instrumented Unity app. AltTester(R) Version: {}", server_version)
135
138
 
136
139
  major_server, minor_server = self._split_version(server_version)
137
140
  major_driver, minor_driver = self._split_version(VERSION)
@@ -640,7 +643,8 @@ class AltDriver:
640
643
 
641
644
  """
642
645
 
643
- commands.ClickCoordinates.run(self._connection, coordinates, count, interval, wait)
646
+ commands.ClickCoordinates.run(
647
+ self._connection, coordinates, count, interval, wait)
644
648
 
645
649
  def key_down(self, key_code, power=1):
646
650
  """Simulates that a specific key was pressed without taking into consideration the duration of the press.
@@ -712,7 +716,8 @@ class AltDriver:
712
716
 
713
717
  """
714
718
 
715
- commands.PressKeys.run(self._connection, key_codes, power, duration, wait)
719
+ commands.PressKeys.run(
720
+ self._connection, key_codes, power, duration, wait)
716
721
 
717
722
  def begin_touch(self, coordinates):
718
723
  """Simulates starting of a touch on the screen.
@@ -778,7 +783,8 @@ class AltDriver:
778
783
 
779
784
  """
780
785
 
781
- commands.MultipointSwipe.run(self._connection, positions, duration, wait)
786
+ commands.MultipointSwipe.run(
787
+ self._connection, positions, duration, wait)
782
788
 
783
789
  def tap(self, coordinates, count=1, interval=0.1, wait=True):
784
790
  """Tap at screen coordinates.
@@ -791,7 +797,8 @@ class AltDriver:
791
797
 
792
798
  """
793
799
 
794
- commands.TapCoordinates.run(self._connection, coordinates, count, interval, wait)
800
+ commands.TapCoordinates.run(
801
+ self._connection, coordinates, count, interval, wait)
795
802
 
796
803
  def tilt(self, acceleration, duration=0.1, wait=True):
797
804
  """Simulates device rotation action in your application.
@@ -891,7 +898,8 @@ class AltDriver:
891
898
 
892
899
  """
893
900
 
894
- data = commands.FindObjectAtCoordinates.run(self._connection, coordinates)
901
+ data = commands.FindObjectAtCoordinates.run(
902
+ self._connection, coordinates)
895
903
  return self._get_alt_object(data)
896
904
 
897
905
  def add_notification_listener(self, notification_type, notification_callback, overwrite=True):
@@ -905,7 +913,8 @@ class AltDriver:
905
913
 
906
914
  """
907
915
 
908
- commands.AddNotificationListener.run(self._connection, notification_type, notification_callback, overwrite)
916
+ commands.AddNotificationListener.run(
917
+ self._connection, notification_type, notification_callback, overwrite)
909
918
 
910
919
  def remove_notification_listener(self, notification_type):
911
920
  """Clear list of callback for the notification type and turn off the notification in tester.
@@ -915,7 +924,8 @@ class AltDriver:
915
924
 
916
925
  """
917
926
 
918
- commands.RemoveNotificationListener.run(self._connection, notification_type)
927
+ commands.RemoveNotificationListener.run(
928
+ self._connection, notification_type)
919
929
 
920
930
  def reset_input(self):
921
931
  """Clear all active input actions simulated by AltTester."""
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -163,7 +163,8 @@ class AltObject:
163
163
  return commands.GetAllComponents.run(self._connection, self)
164
164
 
165
165
  def wait_for_component_property(self, component_name, property_name,
166
- property_value, assembly, timeout=20, interval=0.5):
166
+ property_value, assembly, timeout=20, interval=0.5,
167
+ get_property_as_string=False, max_depth=2):
167
168
  """Wait until a property has a specific value and returns the value of the given component property.
168
169
 
169
170
  Args:
@@ -177,6 +178,10 @@ class AltObject:
177
178
  timeout (:obj:`int`, optional): The number of seconds that it will wait for property.
178
179
  interval (:obj:`float`, optional): The number of seconds after which it will try to find the object again.
179
180
  The interval should be smaller than timeout.
181
+ get_property_as_string (:obj:`bool`, optional): A boolean value that makes the property_value
182
+ to be compared as a string with the property from the instrumented app.
183
+ max_depth (:obj:`int`, optional): An integer value that defines the maximum level from which to retrieve
184
+ properties.
180
185
 
181
186
  Returns:
182
187
  str: The property value is serialized to a JSON string.
@@ -184,7 +189,7 @@ class AltObject:
184
189
  """
185
190
  return commands.WaitForComponentProperty.run(
186
191
  component_name, property_name, property_value,
187
- assembly, self, timeout, interval
192
+ assembly, self, timeout, interval, get_property_as_string, max_depth
188
193
  )
189
194
 
190
195
  def get_component_property(self, component_name, property_name, assembly, max_depth=2):
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -43,7 +43,8 @@ class RemoveNotificationListener(BaseCommand):
43
43
  return parameters
44
44
 
45
45
  def execute(self):
46
- self.connection._notification_handler.remove_notification_listener(self.notification_type)
46
+ self.connection._notification_handler.remove_notification_listener(
47
+ self.notification_type)
47
48
  data = self.send()
48
49
  self.validate_response("Ok", data)
49
50
 
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -31,6 +31,8 @@ class WaitForComponentProperty(Command):
31
31
  altObject,
32
32
  timeout=20,
33
33
  interval=0.5,
34
+ get_property_as_string=False,
35
+ max_depth=2
34
36
  ):
35
37
  self.component_name = component_name
36
38
  self.property_name = property_name
@@ -38,6 +40,8 @@ class WaitForComponentProperty(Command):
38
40
  self.assembly = assembly
39
41
  self.timeout = timeout
40
42
  self.interval = interval
43
+ self.get_property_as_string = get_property_as_string
44
+ self.max_depth = max_depth
41
45
  self.altObject = altObject
42
46
 
43
47
  def execute(self):
@@ -47,9 +51,12 @@ class WaitForComponentProperty(Command):
47
51
  while t <= self.timeout:
48
52
  try:
49
53
  property_found = self.altObject.get_component_property(
50
- self.component_name, self.property_name, self.assembly
54
+ self.component_name, self.property_name, self.assembly, max_depth=self.max_depth
51
55
  )
52
- if property_found == self.property_value:
56
+ if not self.get_property_as_string and property_found == self.property_value:
57
+ return property_found
58
+ if self.get_property_as_string and \
59
+ str(property_found).replace(" ", "") == str(self.property_value).replace(" ", ""):
53
60
  return property_found
54
61
  except Exception as ex:
55
62
  exception = ex
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -70,6 +70,7 @@ class WaitForObject(Command):
70
70
  t += self.interval
71
71
 
72
72
  if t >= self.timeout:
73
- raise WaitTimeOutException("Element {} not found after {} seconds".format(self.value, self.timeout))
73
+ raise WaitTimeOutException(
74
+ "Element {} not found after {} seconds".format(self.value, self.timeout))
74
75
 
75
76
  return alt_object
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -57,7 +57,8 @@ class WaitForObjectToNotBePresent(Command):
57
57
 
58
58
  while (t <= self.timeout):
59
59
  try:
60
- logger.debug("Waiting for element {} to not be present...", self.value)
60
+ logger.debug(
61
+ "Waiting for element {} to not be present...", self.value)
61
62
 
62
63
  FindObject(
63
64
  self.connection,
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -65,7 +65,8 @@ class WaitForObjectWhichContains(Command):
65
65
 
66
66
  break
67
67
  except NotFoundException:
68
- logger.debug("Waiting for element where name contains {}...", self.value)
68
+ logger.debug(
69
+ "Waiting for element where name contains {}...", self.value)
69
70
  time.sleep(self.interval)
70
71
  t += self.interval
71
72
 
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ class KeysDown(BaseCommand):
47
47
  def _parameters(self):
48
48
  parameters = super()._parameters
49
49
  parameters.update(**{
50
- "keyCodes": [str(key_code) for key_code in self.key_codes],
50
+ "keyCodes": [str(key_code.value) for key_code in self.key_codes],
51
51
  "power": self.power
52
52
  })
53
53
 
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -46,7 +46,7 @@ class KeysUp(BaseCommand):
46
46
  def _parameters(self):
47
47
  parameters = super()._parameters
48
48
  parameters.update(**{
49
- "keyCodes": [str(key_code) for key_code in self.key_codes],
49
+ "keyCodes": [str(key_code.value) for key_code in self.key_codes],
50
50
  })
51
51
 
52
52
  return parameters
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -49,7 +49,7 @@ class PressKeys(BaseCommand):
49
49
  def _parameters(self):
50
50
  parameters = super()._parameters
51
51
  parameters.update(**{
52
- "keyCodes": [str(key_code) for key_code in self.key_codes],
52
+ "keyCodes": [str(key_code.value) for key_code in self.key_codes],
53
53
  "power": self.power,
54
54
  "duration": self.duration,
55
55
  "wait": self.wait,
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright(C) 2023 Altom Consulting
2
+ Copyright(C) 2024 Altom Consulting
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU General Public License as published by