robotframework-platynui 0.9.2__cp313-cp313-win_amd64.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.
Files changed (288) hide show
  1. PlatynUI/__about__.py +5 -0
  2. PlatynUI/__init__.py +178 -0
  3. PlatynUI/core/__init__.py +17 -0
  4. PlatynUI/core/adapter.py +156 -0
  5. PlatynUI/core/adapterfactory.py +62 -0
  6. PlatynUI/core/adapterproxy.py +170 -0
  7. PlatynUI/core/contextbase.py +473 -0
  8. PlatynUI/core/ensure.py +155 -0
  9. PlatynUI/core/exceptions.py +81 -0
  10. PlatynUI/core/internal/__init__.py +0 -0
  11. PlatynUI/core/internal/decorator.py +152 -0
  12. PlatynUI/core/locatorbase.py +199 -0
  13. PlatynUI/core/locatorscope.py +21 -0
  14. PlatynUI/core/predicate.py +19 -0
  15. PlatynUI/core/settings.py +66 -0
  16. PlatynUI/core/strategies/__init__.py +5 -0
  17. PlatynUI/core/strategies/strategies.py +30 -0
  18. PlatynUI/core/strategybase.py +12 -0
  19. PlatynUI/core/strategyimpl.py +104 -0
  20. PlatynUI/core/technology.py +29 -0
  21. PlatynUI/core/types.py +425 -0
  22. PlatynUI/core/wait_for.py +51 -0
  23. PlatynUI/core/weight_calculator.py +114 -0
  24. PlatynUI/keywords/__init__.py +25 -0
  25. PlatynUI/keywords/activatable.py +27 -0
  26. PlatynUI/keywords/application.py +22 -0
  27. PlatynUI/keywords/assertable.py +11 -0
  28. PlatynUI/keywords/keyboard.py +26 -0
  29. PlatynUI/keywords/mouse.py +85 -0
  30. PlatynUI/keywords/properties.py +30 -0
  31. PlatynUI/keywords/text.py +21 -0
  32. PlatynUI/keywords/types.py +104 -0
  33. PlatynUI/keywords/wait.py +22 -0
  34. PlatynUI/py.typed +0 -0
  35. PlatynUI/robot/__init__.py +0 -0
  36. PlatynUI/robot/reporting.py +73 -0
  37. PlatynUI/spy/__init__.py +0 -0
  38. PlatynUI/spy/__main__.py +40 -0
  39. PlatynUI/technology/__init__.py +0 -0
  40. PlatynUI/technology/uiautomation/.gitignore +5 -0
  41. PlatynUI/technology/uiautomation/__init__.py +8 -0
  42. PlatynUI/technology/uiautomation/core/adapterfactory.py +91 -0
  43. PlatynUI/technology/uiautomation/core/displaydevice.py +27 -0
  44. PlatynUI/technology/uiautomation/core/impls/__init__.py +6 -0
  45. PlatynUI/technology/uiautomation/core/impls/control.py +35 -0
  46. PlatynUI/technology/uiautomation/core/impls/window.py +87 -0
  47. PlatynUI/technology/uiautomation/core/keyboarddevice.py +25 -0
  48. PlatynUI/technology/uiautomation/core/loader.py +146 -0
  49. PlatynUI/technology/uiautomation/core/mousedevice.py +33 -0
  50. PlatynUI/technology/uiautomation/core/technology.py +65 -0
  51. PlatynUI/technology/uiautomation/core/uiaadapter.py +199 -0
  52. PlatynUI/technology/uiautomation/core/uiabase.py +23 -0
  53. PlatynUI/technology/uiautomation/desktop.py +15 -0
  54. PlatynUI/technology/uiautomation/locator.py +433 -0
  55. PlatynUI/technology/uiautomation/spy/__init__.py +0 -0
  56. PlatynUI/technology/uiautomation/spy/__main__.py +50 -0
  57. PlatynUI/ui/__init__.py +80 -0
  58. PlatynUI/ui/application.py +31 -0
  59. PlatynUI/ui/buttons.py +96 -0
  60. PlatynUI/ui/combobox.py +158 -0
  61. PlatynUI/ui/container.py +13 -0
  62. PlatynUI/ui/control.py +53 -0
  63. PlatynUI/ui/core/__init__.py +7 -0
  64. PlatynUI/ui/core/devices/__init__.py +10 -0
  65. PlatynUI/ui/core/devices/basedisplaydevice.py +29 -0
  66. PlatynUI/ui/core/devices/basekeyboarddevice.py +68 -0
  67. PlatynUI/ui/core/devices/basemousedevice.py +34 -0
  68. PlatynUI/ui/core/devices/basescreendevice.py +20 -0
  69. PlatynUI/ui/core/devices/displaydevice.py +117 -0
  70. PlatynUI/ui/core/devices/inputdevice.py +28 -0
  71. PlatynUI/ui/core/devices/keyboarddevice.py +351 -0
  72. PlatynUI/ui/core/devices/keyboardproxy.py +73 -0
  73. PlatynUI/ui/core/devices/mousebutton.py +15 -0
  74. PlatynUI/ui/core/devices/mousedevice.py +278 -0
  75. PlatynUI/ui/core/devices/mouseproxy.py +186 -0
  76. PlatynUI/ui/core/ui_technology.py +35 -0
  77. PlatynUI/ui/core/window_manager.py +62 -0
  78. PlatynUI/ui/data_item.py +16 -0
  79. PlatynUI/ui/desktop.py +15 -0
  80. PlatynUI/ui/desktopbase.py +60 -0
  81. PlatynUI/ui/dialog.py +14 -0
  82. PlatynUI/ui/edit.py +13 -0
  83. PlatynUI/ui/element.py +270 -0
  84. PlatynUI/ui/graphic.py +18 -0
  85. PlatynUI/ui/header.py +36 -0
  86. PlatynUI/ui/item.py +107 -0
  87. PlatynUI/ui/label.py +22 -0
  88. PlatynUI/ui/lists.py +40 -0
  89. PlatynUI/ui/locator.py +433 -0
  90. PlatynUI/ui/menus.py +45 -0
  91. PlatynUI/ui/orientation.py +13 -0
  92. PlatynUI/ui/pane.py +18 -0
  93. PlatynUI/ui/proxies/__init__.py +8 -0
  94. PlatynUI/ui/proxies/standardproxies.py +408 -0
  95. PlatynUI/ui/runtime/.gitignore +7 -0
  96. PlatynUI/ui/runtime/__init__.py +3 -0
  97. PlatynUI/ui/runtime/adapter_impl.py +228 -0
  98. PlatynUI/ui/runtime/adapter_impl_base.py +25 -0
  99. PlatynUI/ui/runtime/adapterfactory_impl.py +119 -0
  100. PlatynUI/ui/runtime/coreclr/Avalonia.Base.dll +0 -0
  101. PlatynUI/ui/runtime/coreclr/Avalonia.Controls.ColorPicker.dll +0 -0
  102. PlatynUI/ui/runtime/coreclr/Avalonia.Controls.DataGrid.dll +0 -0
  103. PlatynUI/ui/runtime/coreclr/Avalonia.Controls.dll +0 -0
  104. PlatynUI/ui/runtime/coreclr/Avalonia.DesignerSupport.dll +0 -0
  105. PlatynUI/ui/runtime/coreclr/Avalonia.Desktop.dll +0 -0
  106. PlatynUI/ui/runtime/coreclr/Avalonia.Dialogs.dll +0 -0
  107. PlatynUI/ui/runtime/coreclr/Avalonia.Fonts.Inter.dll +0 -0
  108. PlatynUI/ui/runtime/coreclr/Avalonia.FreeDesktop.dll +0 -0
  109. PlatynUI/ui/runtime/coreclr/Avalonia.Markup.Xaml.dll +0 -0
  110. PlatynUI/ui/runtime/coreclr/Avalonia.Markup.dll +0 -0
  111. PlatynUI/ui/runtime/coreclr/Avalonia.Metal.dll +0 -0
  112. PlatynUI/ui/runtime/coreclr/Avalonia.MicroCom.dll +0 -0
  113. PlatynUI/ui/runtime/coreclr/Avalonia.Native.dll +0 -0
  114. PlatynUI/ui/runtime/coreclr/Avalonia.OpenGL.dll +0 -0
  115. PlatynUI/ui/runtime/coreclr/Avalonia.ReactiveUI.dll +0 -0
  116. PlatynUI/ui/runtime/coreclr/Avalonia.Remote.Protocol.dll +0 -0
  117. PlatynUI/ui/runtime/coreclr/Avalonia.Skia.dll +0 -0
  118. PlatynUI/ui/runtime/coreclr/Avalonia.Themes.Fluent.dll +0 -0
  119. PlatynUI/ui/runtime/coreclr/Avalonia.Themes.Simple.dll +0 -0
  120. PlatynUI/ui/runtime/coreclr/Avalonia.Vulkan.dll +0 -0
  121. PlatynUI/ui/runtime/coreclr/Avalonia.Win32.Automation.dll +0 -0
  122. PlatynUI/ui/runtime/coreclr/Avalonia.Win32.dll +0 -0
  123. PlatynUI/ui/runtime/coreclr/Avalonia.X11.dll +0 -0
  124. PlatynUI/ui/runtime/coreclr/Avalonia.dll +0 -0
  125. PlatynUI/ui/runtime/coreclr/DynamicData.dll +0 -0
  126. PlatynUI/ui/runtime/coreclr/FluentAvalonia.dll +0 -0
  127. PlatynUI/ui/runtime/coreclr/HarfBuzzSharp.dll +0 -0
  128. PlatynUI/ui/runtime/coreclr/MessagePack.Annotations.dll +0 -0
  129. PlatynUI/ui/runtime/coreclr/MessagePack.dll +0 -0
  130. PlatynUI/ui/runtime/coreclr/MicroCom.Runtime.dll +0 -0
  131. PlatynUI/ui/runtime/coreclr/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
  132. PlatynUI/ui/runtime/coreclr/Microsoft.NET.StringTools.dll +0 -0
  133. PlatynUI/ui/runtime/coreclr/Microsoft.VisualStudio.Threading.dll +0 -0
  134. PlatynUI/ui/runtime/coreclr/Microsoft.VisualStudio.Validation.dll +0 -0
  135. PlatynUI/ui/runtime/coreclr/Nerdbank.Streams.dll +0 -0
  136. PlatynUI/ui/runtime/coreclr/Newtonsoft.Json.dll +0 -0
  137. PlatynUI/ui/runtime/coreclr/PlatynUI.Extension.Provider.Client.dll +0 -0
  138. PlatynUI/ui/runtime/coreclr/PlatynUI.Extension.Win32.UiAutomation.dll +0 -0
  139. PlatynUI/ui/runtime/coreclr/PlatynUI.Platform.Win32.dll +0 -0
  140. PlatynUI/ui/runtime/coreclr/PlatynUI.Provider.Core.dll +0 -0
  141. PlatynUI/ui/runtime/coreclr/PlatynUI.Runtime.dll +0 -0
  142. PlatynUI/ui/runtime/coreclr/PlatynUI.Spy.deps.json +1045 -0
  143. PlatynUI/ui/runtime/coreclr/PlatynUI.Spy.dll +0 -0
  144. PlatynUI/ui/runtime/coreclr/PlatynUI.Spy.exe +0 -0
  145. PlatynUI/ui/runtime/coreclr/PlatynUI.Spy.runtimeconfig.json +15 -0
  146. PlatynUI/ui/runtime/coreclr/ReactiveUI.dll +0 -0
  147. PlatynUI/ui/runtime/coreclr/SkiaSharp.dll +0 -0
  148. PlatynUI/ui/runtime/coreclr/Splat.dll +0 -0
  149. PlatynUI/ui/runtime/coreclr/StreamJsonRpc.dll +0 -0
  150. PlatynUI/ui/runtime/coreclr/System.CodeDom.dll +0 -0
  151. PlatynUI/ui/runtime/coreclr/System.ComponentModel.Composition.dll +0 -0
  152. PlatynUI/ui/runtime/coreclr/System.IO.Pipelines.dll +0 -0
  153. PlatynUI/ui/runtime/coreclr/System.Reactive.dll +0 -0
  154. PlatynUI/ui/runtime/coreclr/Tmds.DBus.Protocol.dll +0 -0
  155. PlatynUI/ui/runtime/coreclr/av_libglesv2.dll +0 -0
  156. PlatynUI/ui/runtime/coreclr/cs/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  157. PlatynUI/ui/runtime/coreclr/cs/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  158. PlatynUI/ui/runtime/coreclr/cs/StreamJsonRpc.resources.dll +0 -0
  159. PlatynUI/ui/runtime/coreclr/de/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  160. PlatynUI/ui/runtime/coreclr/de/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  161. PlatynUI/ui/runtime/coreclr/de/StreamJsonRpc.resources.dll +0 -0
  162. PlatynUI/ui/runtime/coreclr/es/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  163. PlatynUI/ui/runtime/coreclr/es/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  164. PlatynUI/ui/runtime/coreclr/es/StreamJsonRpc.resources.dll +0 -0
  165. PlatynUI/ui/runtime/coreclr/fr/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  166. PlatynUI/ui/runtime/coreclr/fr/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  167. PlatynUI/ui/runtime/coreclr/fr/StreamJsonRpc.resources.dll +0 -0
  168. PlatynUI/ui/runtime/coreclr/it/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  169. PlatynUI/ui/runtime/coreclr/it/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  170. PlatynUI/ui/runtime/coreclr/it/StreamJsonRpc.resources.dll +0 -0
  171. PlatynUI/ui/runtime/coreclr/ja/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  172. PlatynUI/ui/runtime/coreclr/ja/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  173. PlatynUI/ui/runtime/coreclr/ja/StreamJsonRpc.resources.dll +0 -0
  174. PlatynUI/ui/runtime/coreclr/ko/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  175. PlatynUI/ui/runtime/coreclr/ko/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  176. PlatynUI/ui/runtime/coreclr/ko/StreamJsonRpc.resources.dll +0 -0
  177. PlatynUI/ui/runtime/coreclr/libHarfBuzzSharp.dll +0 -0
  178. PlatynUI/ui/runtime/coreclr/libSkiaSharp.dll +0 -0
  179. PlatynUI/ui/runtime/coreclr/pl/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  180. PlatynUI/ui/runtime/coreclr/pl/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  181. PlatynUI/ui/runtime/coreclr/pl/StreamJsonRpc.resources.dll +0 -0
  182. PlatynUI/ui/runtime/coreclr/pt-BR/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  183. PlatynUI/ui/runtime/coreclr/pt-BR/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  184. PlatynUI/ui/runtime/coreclr/pt-BR/StreamJsonRpc.resources.dll +0 -0
  185. PlatynUI/ui/runtime/coreclr/ru/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  186. PlatynUI/ui/runtime/coreclr/ru/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  187. PlatynUI/ui/runtime/coreclr/ru/StreamJsonRpc.resources.dll +0 -0
  188. PlatynUI/ui/runtime/coreclr/tr/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  189. PlatynUI/ui/runtime/coreclr/tr/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  190. PlatynUI/ui/runtime/coreclr/tr/StreamJsonRpc.resources.dll +0 -0
  191. PlatynUI/ui/runtime/coreclr/zh-Hans/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  192. PlatynUI/ui/runtime/coreclr/zh-Hans/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  193. PlatynUI/ui/runtime/coreclr/zh-Hans/StreamJsonRpc.resources.dll +0 -0
  194. PlatynUI/ui/runtime/coreclr/zh-Hant/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  195. PlatynUI/ui/runtime/coreclr/zh-Hant/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  196. PlatynUI/ui/runtime/coreclr/zh-Hant/StreamJsonRpc.resources.dll +0 -0
  197. PlatynUI/ui/runtime/display_device_impl.py +27 -0
  198. PlatynUI/ui/runtime/dotnet_interface.py +144 -0
  199. PlatynUI/ui/runtime/keyboard_device_impl.py +25 -0
  200. PlatynUI/ui/runtime/mouse_device_impl.py +33 -0
  201. PlatynUI/ui/runtime/providers/avalonia/MessagePack.Annotations.dll +0 -0
  202. PlatynUI/ui/runtime/providers/avalonia/MessagePack.dll +0 -0
  203. PlatynUI/ui/runtime/providers/avalonia/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
  204. PlatynUI/ui/runtime/providers/avalonia/Microsoft.NET.StringTools.dll +0 -0
  205. PlatynUI/ui/runtime/providers/avalonia/Microsoft.VisualStudio.Threading.dll +0 -0
  206. PlatynUI/ui/runtime/providers/avalonia/Microsoft.VisualStudio.Validation.dll +0 -0
  207. PlatynUI/ui/runtime/providers/avalonia/Nerdbank.Streams.dll +0 -0
  208. PlatynUI/ui/runtime/providers/avalonia/Newtonsoft.Json.dll +0 -0
  209. PlatynUI/ui/runtime/providers/avalonia/PlatynUI.Provider.Avalonia.deps.json +600 -0
  210. PlatynUI/ui/runtime/providers/avalonia/PlatynUI.Provider.Avalonia.dll +0 -0
  211. PlatynUI/ui/runtime/providers/avalonia/PlatynUI.Provider.Core.dll +0 -0
  212. PlatynUI/ui/runtime/providers/avalonia/PlatynUI.Provider.Server.dll +0 -0
  213. PlatynUI/ui/runtime/providers/avalonia/StreamJsonRpc.dll +0 -0
  214. PlatynUI/ui/runtime/providers/avalonia/System.IO.Pipelines.dll +0 -0
  215. PlatynUI/ui/runtime/providers/avalonia/cs/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  216. PlatynUI/ui/runtime/providers/avalonia/cs/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  217. PlatynUI/ui/runtime/providers/avalonia/cs/StreamJsonRpc.resources.dll +0 -0
  218. PlatynUI/ui/runtime/providers/avalonia/de/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  219. PlatynUI/ui/runtime/providers/avalonia/de/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  220. PlatynUI/ui/runtime/providers/avalonia/de/StreamJsonRpc.resources.dll +0 -0
  221. PlatynUI/ui/runtime/providers/avalonia/es/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  222. PlatynUI/ui/runtime/providers/avalonia/es/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  223. PlatynUI/ui/runtime/providers/avalonia/es/StreamJsonRpc.resources.dll +0 -0
  224. PlatynUI/ui/runtime/providers/avalonia/fr/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  225. PlatynUI/ui/runtime/providers/avalonia/fr/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  226. PlatynUI/ui/runtime/providers/avalonia/fr/StreamJsonRpc.resources.dll +0 -0
  227. PlatynUI/ui/runtime/providers/avalonia/it/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  228. PlatynUI/ui/runtime/providers/avalonia/it/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  229. PlatynUI/ui/runtime/providers/avalonia/it/StreamJsonRpc.resources.dll +0 -0
  230. PlatynUI/ui/runtime/providers/avalonia/ja/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  231. PlatynUI/ui/runtime/providers/avalonia/ja/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  232. PlatynUI/ui/runtime/providers/avalonia/ja/StreamJsonRpc.resources.dll +0 -0
  233. PlatynUI/ui/runtime/providers/avalonia/ko/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  234. PlatynUI/ui/runtime/providers/avalonia/ko/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  235. PlatynUI/ui/runtime/providers/avalonia/ko/StreamJsonRpc.resources.dll +0 -0
  236. PlatynUI/ui/runtime/providers/avalonia/pl/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  237. PlatynUI/ui/runtime/providers/avalonia/pl/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  238. PlatynUI/ui/runtime/providers/avalonia/pl/StreamJsonRpc.resources.dll +0 -0
  239. PlatynUI/ui/runtime/providers/avalonia/pt-BR/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  240. PlatynUI/ui/runtime/providers/avalonia/pt-BR/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  241. PlatynUI/ui/runtime/providers/avalonia/pt-BR/StreamJsonRpc.resources.dll +0 -0
  242. PlatynUI/ui/runtime/providers/avalonia/ru/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  243. PlatynUI/ui/runtime/providers/avalonia/ru/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  244. PlatynUI/ui/runtime/providers/avalonia/ru/StreamJsonRpc.resources.dll +0 -0
  245. PlatynUI/ui/runtime/providers/avalonia/tr/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  246. PlatynUI/ui/runtime/providers/avalonia/tr/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  247. PlatynUI/ui/runtime/providers/avalonia/tr/StreamJsonRpc.resources.dll +0 -0
  248. PlatynUI/ui/runtime/providers/avalonia/zh-Hans/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  249. PlatynUI/ui/runtime/providers/avalonia/zh-Hans/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  250. PlatynUI/ui/runtime/providers/avalonia/zh-Hans/StreamJsonRpc.resources.dll +0 -0
  251. PlatynUI/ui/runtime/providers/avalonia/zh-Hant/Microsoft.VisualStudio.Threading.resources.dll +0 -0
  252. PlatynUI/ui/runtime/providers/avalonia/zh-Hant/Microsoft.VisualStudio.Validation.resources.dll +0 -0
  253. PlatynUI/ui/runtime/providers/avalonia/zh-Hant/StreamJsonRpc.resources.dll +0 -0
  254. PlatynUI/ui/runtime/technology_impl.py +63 -0
  255. PlatynUI/ui/scrollbar.py +13 -0
  256. PlatynUI/ui/strategies/__init__.py +24 -0
  257. PlatynUI/ui/strategies/activatable.py +31 -0
  258. PlatynUI/ui/strategies/application.py +32 -0
  259. PlatynUI/ui/strategies/closeable.py +26 -0
  260. PlatynUI/ui/strategies/control.py +20 -0
  261. PlatynUI/ui/strategies/devices.py +27 -0
  262. PlatynUI/ui/strategies/editable.py +17 -0
  263. PlatynUI/ui/strategies/element.py +69 -0
  264. PlatynUI/ui/strategies/expandable.py +31 -0
  265. PlatynUI/ui/strategies/hasnativewindowhandle.py +18 -0
  266. PlatynUI/ui/strategies/hasorientation.py +19 -0
  267. PlatynUI/ui/strategies/maximizeable.py +31 -0
  268. PlatynUI/ui/strategies/minimizeable.py +31 -0
  269. PlatynUI/ui/strategies/movable.py +18 -0
  270. PlatynUI/ui/strategies/resizable.py +17 -0
  271. PlatynUI/ui/strategies/restorable.py +17 -0
  272. PlatynUI/ui/strategies/selectable.py +31 -0
  273. PlatynUI/ui/strategies/text.py +59 -0
  274. PlatynUI/ui/strategies/title.py +18 -0
  275. PlatynUI/ui/strategies/toggleable.py +27 -0
  276. PlatynUI/ui/strategies/value.py +19 -0
  277. PlatynUI/ui/table.py +58 -0
  278. PlatynUI/ui/tabs.py +32 -0
  279. PlatynUI/ui/text.py +52 -0
  280. PlatynUI/ui/togglestate.py +16 -0
  281. PlatynUI/ui/tree.py +101 -0
  282. PlatynUI/ui/unknown.py +13 -0
  283. PlatynUI/ui/window.py +196 -0
  284. robotframework_platynui-0.9.2.dist-info/METADATA +192 -0
  285. robotframework_platynui-0.9.2.dist-info/RECORD +288 -0
  286. robotframework_platynui-0.9.2.dist-info/WHEEL +4 -0
  287. robotframework_platynui-0.9.2.dist-info/entry_points.txt +2 -0
  288. robotframework_platynui-0.9.2.dist-info/licenses/LICENSE.txt +73 -0
PlatynUI/__about__.py ADDED
@@ -0,0 +1,5 @@
1
+ # SPDX-FileCopyrightText: 2024 Daniel Biehl <daniel.biehl@imbus.de>
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ __version__ = "0.9.2"
PlatynUI/__init__.py ADDED
@@ -0,0 +1,178 @@
1
+ # SPDX-FileCopyrightText: 2024 Daniel Biehl <daniel.biehl@imbus.de>
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ import inspect
6
+ from typing import Any, List, Optional, Tuple, Union
7
+
8
+ from assertionengine import AssertionOperator, verify_assertion
9
+ from robot.api.deco import library
10
+ from robotlibcore import DynamicCore, keyword
11
+
12
+ from .__about__ import __version__
13
+ from .keywords import (
14
+ ActivatableKeywords,
15
+ Application,
16
+ ElementDescriptor,
17
+ Keyboard,
18
+ Mouse,
19
+ Properties,
20
+ RootElementDescriptor,
21
+ TextKeywords,
22
+ Wait,
23
+ )
24
+ from .keywords.assertable import PLATYNUI_ASSERTABLE_FIELD
25
+ from .ui import Locator, strategies
26
+
27
+
28
+ def convert_locator(value) -> Locator: # type: ignore
29
+ return Locator(path=value)
30
+
31
+
32
+ def _get_args_index(args_list: List[Union[str, Tuple[str], Tuple[str, Any]]]) -> int:
33
+ return next(
34
+ (i for i, r in enumerate(args_list) if (isinstance(r, str) and r.startswith("*")) or r[0].startswith("**")),
35
+ len(args_list),
36
+ )
37
+
38
+
39
+ _assertion_parameters = [
40
+ inspect.Parameter(
41
+ "assertion_operator",
42
+ inspect.Parameter.POSITIONAL_OR_KEYWORD,
43
+ annotation=Optional["AssertionOperator"],
44
+ default=None,
45
+ ),
46
+ inspect.Parameter(
47
+ "assertion_expected",
48
+ inspect.Parameter.POSITIONAL_OR_KEYWORD,
49
+ annotation=Optional[Any],
50
+ default=None,
51
+ ),
52
+ inspect.Parameter(
53
+ "assertion_message",
54
+ inspect.Parameter.POSITIONAL_OR_KEYWORD,
55
+ annotation=Optional[str],
56
+ default=None,
57
+ ),
58
+ ]
59
+
60
+
61
+ def _add_assertion_parameters(sig: inspect.Signature) -> inspect.Signature:
62
+ # Originale Parameter in Kategorien aufteilen
63
+ positional_only = []
64
+ positional_or_keyword = []
65
+ var_positional = None
66
+ keyword_only = []
67
+ var_keyword = None
68
+
69
+ for param in sig.parameters.values():
70
+ if param.kind == inspect.Parameter.POSITIONAL_ONLY:
71
+ positional_only.append(param)
72
+ elif param.kind == inspect.Parameter.POSITIONAL_OR_KEYWORD:
73
+ positional_or_keyword.append(param)
74
+ elif param.kind == inspect.Parameter.VAR_POSITIONAL:
75
+ var_positional = param
76
+ elif param.kind == inspect.Parameter.KEYWORD_ONLY:
77
+ keyword_only.append(param)
78
+ elif param.kind == inspect.Parameter.VAR_KEYWORD:
79
+ var_keyword = param
80
+
81
+ # Neue Reihenfolge der Parameter erstellen
82
+ updated_parameters = (
83
+ positional_only
84
+ + positional_or_keyword
85
+ + _assertion_parameters # Neue Parameter hinzufügen
86
+ + ([var_positional] if var_positional else [])
87
+ + keyword_only
88
+ + ([var_keyword] if var_keyword else [])
89
+ )
90
+
91
+ # Neue Signatur erstellen
92
+ return inspect.Signature(parameters=updated_parameters)
93
+
94
+
95
+ @library(
96
+ scope="GLOBAL",
97
+ version=__version__,
98
+ converters={
99
+ RootElementDescriptor: RootElementDescriptor.convert,
100
+ ElementDescriptor: ElementDescriptor.convert,
101
+ strategies.Activatable: ElementDescriptor[strategies.Activatable].convert,
102
+ strategies.Deactivatable: ElementDescriptor[strategies.Deactivatable].convert,
103
+ strategies.HasIsActive: ElementDescriptor[strategies.HasIsActive].convert,
104
+ Locator: convert_locator,
105
+ },
106
+ )
107
+ class PlatynUI(DynamicCore):
108
+ def __init__(self) -> None:
109
+ super().__init__(
110
+ [Application(), ActivatableKeywords(), TextKeywords(), Keyboard(), Mouse(), Properties(), Wait()]
111
+ )
112
+
113
+ def get_keyword_arguments(self, name: str) -> Any:
114
+ result: List[Union[str, Tuple[str], Tuple[str, Any]]] = super().get_keyword_arguments(name)
115
+
116
+ kw = self.keywords.get(name)
117
+
118
+ if kw is not None and getattr(kw, PLATYNUI_ASSERTABLE_FIELD, False):
119
+ kwargs_index = _get_args_index(result)
120
+ result.insert(kwargs_index, ("assertion_operator", None))
121
+ result.insert(kwargs_index + 1, ("assertion_expected", None))
122
+ result.insert(kwargs_index + 2, ("assertion_message", None))
123
+ return result
124
+
125
+ def get_keyword_types(self, name: str) -> Any:
126
+ result = super().get_keyword_types(name)
127
+
128
+ kw = self.keywords.get(name)
129
+
130
+ if kw is not None and getattr(kw, PLATYNUI_ASSERTABLE_FIELD, False):
131
+ result["assertion_operator"] = Optional[AssertionOperator]
132
+ result["assertion_expected"] = any
133
+ result["assertion_message"] = Optional[str]
134
+
135
+ return result
136
+
137
+ def run_keyword(self, name: str, args: Any, kwargs: Any = None) -> Any:
138
+ kw = self.keywords.get(name)
139
+ if kw is not None and getattr(kw, PLATYNUI_ASSERTABLE_FIELD, False):
140
+
141
+ def do_verify(
142
+ *args: Any,
143
+ assertion_operator: Optional[AssertionOperator] = None,
144
+ assertion_expected: Optional[Any] = None,
145
+ assertion_message: Optional[str] = None,
146
+ **kwargs: Any,
147
+ ) -> Any:
148
+ return verify_assertion(
149
+ self.keywords[name](*args, **(kwargs or {})),
150
+ assertion_operator,
151
+ assertion_expected,
152
+ name,
153
+ assertion_message,
154
+ )
155
+
156
+ new_sig = _add_assertion_parameters(inspect.signature(kw))
157
+
158
+ bound_args = new_sig.bind(*args, **(kwargs or {}))
159
+ bound_args.apply_defaults()
160
+
161
+ assertion_operator = bound_args.arguments.pop("assertion_operator", None)
162
+ assertion_expected = bound_args.arguments.pop("assertion_expected", None)
163
+ assertion_message = bound_args.arguments.pop("assertion_message", None)
164
+
165
+ return do_verify(
166
+ *bound_args.args,
167
+ assertion_operator=assertion_operator,
168
+ assertion_expected=assertion_expected,
169
+ assertion_message=assertion_message,
170
+ **(bound_args.kwargs or {}),
171
+ )
172
+
173
+ return self.keywords[name](*args, **(kwargs or {}))
174
+
175
+ @keyword
176
+ def set_root_element(self, element: RootElementDescriptor) -> None:
177
+ """Sets the context to the given locator."""
178
+ ElementDescriptor.set_root_element(element)
@@ -0,0 +1,17 @@
1
+ # SPDX-FileCopyrightText: 2024 Daniel Biehl <daniel.biehl@imbus.de>
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ from .adapter import *
6
+ from .adapterfactory import *
7
+ from .adapterproxy import *
8
+ from .contextbase import *
9
+ from .exceptions import *
10
+ from .locatorbase import *
11
+ from .locatorscope import *
12
+ from .settings import *
13
+ from .strategybase import *
14
+ from .strategyimpl import *
15
+ from .technology import *
16
+ from .types import *
17
+ from .wait_for import *
@@ -0,0 +1,156 @@
1
+ # SPDX-FileCopyrightText: 2024 Daniel Biehl <daniel.biehl@imbus.de>
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ import inspect
6
+ from abc import ABCMeta, abstractmethod
7
+ from typing import Any, Dict, List, Optional, Set, Type, TypeVar, overload
8
+
9
+ from .exceptions import AdapterNotSupportsStrategyError, NotAStrategyTypeError
10
+ from .strategybase import StrategyBase
11
+ from .strategyimpl import StrategyImplFactory
12
+ from .technology import Technology
13
+
14
+ __all__ = ["Adapter", "TStrategyBase"]
15
+
16
+ TStrategyBase = TypeVar("TStrategyBase", bound=StrategyBase)
17
+
18
+
19
+ class Adapter(StrategyBase, metaclass=ABCMeta):
20
+ """
21
+ the base adapter
22
+ """
23
+
24
+ def __init__(self) -> None:
25
+ super().__init__()
26
+ self._strategy_cache: Dict[str, StrategyBase] = {}
27
+
28
+ strategy_name = "io.platynui.Adapter"
29
+
30
+ @property
31
+ @abstractmethod
32
+ def valid(self) -> bool:
33
+ """
34
+ get true if the adapter is valid at this time
35
+ :return:
36
+ """
37
+
38
+ @property
39
+ @abstractmethod
40
+ def id(self) -> str:
41
+ pass
42
+
43
+ @property
44
+ @abstractmethod
45
+ def name(self) -> str:
46
+ pass
47
+
48
+ @property
49
+ @abstractmethod
50
+ def class_name(self) -> str:
51
+ pass
52
+
53
+ @property
54
+ def tag_name(self) -> str:
55
+ return ""
56
+
57
+ @property
58
+ @abstractmethod
59
+ def role(self) -> str:
60
+ pass
61
+
62
+ @property
63
+ @abstractmethod
64
+ def supported_roles(self) -> Set[str]:
65
+ pass
66
+
67
+ @property
68
+ @abstractmethod
69
+ def type(self) -> str:
70
+ pass
71
+
72
+ @property
73
+ @abstractmethod
74
+ def supported_types(self) -> Set[str]:
75
+ pass
76
+
77
+ @property
78
+ @abstractmethod
79
+ def framework_id(self) -> str:
80
+ pass
81
+
82
+ @property
83
+ @abstractmethod
84
+ def runtime_id(self) -> str:
85
+ pass
86
+
87
+ @property
88
+ def supported_strategies(self) -> Set[str]:
89
+ if self.valid:
90
+ return {
91
+ m.strategy_name
92
+ for m in inspect.getmro(type(self))
93
+ if hasattr(m, "strategy_name") and m.strategy_name is not None
94
+ }
95
+
96
+ return set()
97
+
98
+ @overload
99
+ def get_strategy(self, strategy_type: Type[TStrategyBase]) -> TStrategyBase: ...
100
+
101
+ @overload
102
+ def get_strategy(self, strategy_type: Type[TStrategyBase], raise_exception: bool) -> Optional[TStrategyBase]: ...
103
+
104
+ def get_strategy(self, strategy_type: Type[TStrategyBase], raise_exception: bool = True) -> Optional[TStrategyBase]:
105
+ if hasattr(strategy_type, "strategy_name"):
106
+ strategy_name = getattr(strategy_type, "strategy_name")
107
+
108
+ if strategy_name in self._strategy_cache:
109
+ result = self._strategy_cache[strategy_name]
110
+ if isinstance(result, strategy_type):
111
+ return result
112
+
113
+ if strategy_name is not None:
114
+ result1 = self
115
+ if isinstance(result1, strategy_type):
116
+ self._strategy_cache[strategy_name] = result1
117
+ return result1
118
+
119
+ result2 = StrategyImplFactory.find_strategy_impl_for(self, strategy_type)
120
+ if result2 is not None:
121
+ self._strategy_cache[strategy_name] = result2
122
+ return result2
123
+
124
+ if raise_exception:
125
+ raise AdapterNotSupportsStrategyError(
126
+ "adapter not supports the %s strategy" % strategy_name
127
+ if strategy_name is not None
128
+ else repr(strategy_type)
129
+ )
130
+ return None
131
+
132
+ if raise_exception:
133
+ raise NotAStrategyTypeError("type %s is not a strategy type" % repr(strategy_type))
134
+
135
+ return None
136
+
137
+ def supports_strategy(self, strategy_type: Type[TStrategyBase]) -> bool:
138
+ return self.get_strategy(strategy_type, False) is not None
139
+
140
+ @property
141
+ @abstractmethod
142
+ def technology(self) -> Technology: ...
143
+
144
+ @property
145
+ @abstractmethod
146
+ def parent(self) -> Optional["Adapter"]: ...
147
+
148
+ @property
149
+ @abstractmethod
150
+ def children(self) -> List["Adapter"]: ...
151
+
152
+ def __eq__(self, other: Any) -> bool:
153
+ if isinstance(other, Adapter):
154
+ return self.runtime_id == other.runtime_id
155
+
156
+ raise NotImplementedError
@@ -0,0 +1,62 @@
1
+ # SPDX-FileCopyrightText: 2024 Daniel Biehl <daniel.biehl@imbus.de>
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ from abc import ABC, abstractmethod
6
+ from typing import TYPE_CHECKING, List, Optional, Type, overload
7
+
8
+ if TYPE_CHECKING:
9
+ from .adapter import Adapter
10
+ from .contextbase import ContextBase
11
+ from .locatorbase import LocatorBase
12
+
13
+ __all__ = ["AdapterFactory"]
14
+
15
+
16
+ class AdapterFactory(ABC):
17
+ @overload
18
+ def get_adapter(
19
+ self,
20
+ locator: "LocatorBase",
21
+ parent: Optional["ContextBase"] = None,
22
+ context_type: Optional[Type["ContextBase"]] = None,
23
+ ) -> "Adapter":
24
+ pass
25
+
26
+ @overload
27
+ def get_adapter(
28
+ self,
29
+ locator: "LocatorBase",
30
+ parent: Optional["ContextBase"] = None,
31
+ context_type: Optional[Type["ContextBase"]] = None,
32
+ raise_error: bool = True,
33
+ ) -> Optional["Adapter"]:
34
+ pass
35
+
36
+ @abstractmethod
37
+ def get_adapter(
38
+ self,
39
+ locator: "LocatorBase",
40
+ parent: Optional["ContextBase"] = None,
41
+ context_type: Optional[Type["ContextBase"]] = None,
42
+ raise_error: bool = True,
43
+ ) -> Optional["Adapter"]:
44
+ pass
45
+
46
+ @abstractmethod
47
+ def get_children_adapters(
48
+ self,
49
+ parent: Optional["ContextBase"],
50
+ context_type: Optional[Type["ContextBase"]],
51
+ locator: "LocatorBase",
52
+ raise_error: bool = True,
53
+ ) -> List["Adapter"]:
54
+ pass
55
+
56
+ @abstractmethod
57
+ def get_parent_adapter(
58
+ self,
59
+ adapter: Optional["ContextBase"],
60
+ raise_error: bool = True,
61
+ ) -> Optional["Adapter"]:
62
+ pass
@@ -0,0 +1,170 @@
1
+ # SPDX-FileCopyrightText: 2024 Daniel Biehl <daniel.biehl@imbus.de>
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ from typing import Any, Callable, Dict, List, Optional, Set, Type, TypeVar, cast, overload
6
+
7
+ from .adapter import Adapter, TStrategyBase
8
+ from .strategybase import StrategyBase
9
+ from .technology import Technology
10
+ from .weight_calculator import WeightCalculator
11
+
12
+ __all__ = [
13
+ "AdapterProxy",
14
+ "AdapterProxyFactory",
15
+ "adapter_proxy_for",
16
+ ]
17
+
18
+
19
+ class AdapterProxy(Adapter):
20
+ def __init__(self, adapter: Adapter):
21
+ self._adapter = adapter
22
+
23
+ @property
24
+ def adapter(self) -> Adapter:
25
+ return self._adapter
26
+
27
+ @property
28
+ def valid(self) -> bool:
29
+ return self.adapter.valid
30
+
31
+ @property
32
+ def id(self) -> str:
33
+ return self.adapter.id
34
+
35
+ @property
36
+ def name(self) -> str:
37
+ return self.adapter.name
38
+
39
+ @property
40
+ def class_name(self) -> str:
41
+ return self.adapter.class_name
42
+
43
+ @property
44
+ def tag_name(self) -> str:
45
+ return self.adapter.tag_name
46
+
47
+ @property
48
+ def role(self) -> str:
49
+ return self.adapter.role
50
+
51
+ @property
52
+ def supported_roles(self) -> Set[str]:
53
+ return self.adapter.supported_roles
54
+
55
+ @property
56
+ def type(self) -> str:
57
+ return self.adapter.type
58
+
59
+ @property
60
+ def supported_types(self) -> Set[str]:
61
+ return self.adapter.supported_types
62
+
63
+ @property
64
+ def framework_id(self) -> str:
65
+ return self.adapter.framework_id
66
+
67
+ @property
68
+ def runtime_id(self) -> Any:
69
+ return self.adapter.runtime_id
70
+
71
+ @property
72
+ def technology(self) -> Technology:
73
+ return self.adapter.technology
74
+
75
+ @property
76
+ def _self_implemented_strategies(self) -> Set[str]:
77
+ return set(
78
+ [
79
+ getattr(i, "strategy_name")
80
+ for i in type(self).mro()
81
+ if issubclass(i, StrategyBase) and i != StrategyBase and hasattr(i, "strategy_name")
82
+ ]
83
+ )
84
+
85
+ @property
86
+ def supported_strategies(self) -> Set[str]:
87
+ return self._self_implemented_strategies.union(self.adapter.supported_strategies)
88
+
89
+ @overload
90
+ def get_strategy(self, strategy_type: Type[TStrategyBase]) -> TStrategyBase: ...
91
+
92
+ @overload
93
+ def get_strategy(self, strategy_type: Type[TStrategyBase], raise_exception: bool) -> Optional[TStrategyBase]: ...
94
+
95
+ def get_strategy(self, strategy_type: Type[TStrategyBase], raise_exception: bool = True) -> Optional[TStrategyBase]:
96
+ if hasattr(strategy_type, "strategy_name"):
97
+ if strategy_type.strategy_name is not None:
98
+ if strategy_type.strategy_name in self._self_implemented_strategies:
99
+ return cast(strategy_type, self) # type: ignore
100
+
101
+ return self.adapter.get_strategy(strategy_type, raise_exception)
102
+
103
+ @property
104
+ def parent(self) -> Optional["Adapter"]:
105
+ return self.adapter.parent
106
+
107
+ @property
108
+ def children(self) -> List["Adapter"]:
109
+ return self.adapter.children
110
+
111
+
112
+ TAdapter = TypeVar("TAdapter", bound=Adapter)
113
+
114
+
115
+ class AdapterProxyFactory:
116
+ class Entry:
117
+ def __init__(self, proxy_type: Type[AdapterProxy], criterias: Dict[str, object]):
118
+ self.proxy_type = proxy_type
119
+ self.criterias = criterias
120
+
121
+ registered_adapters: List[Entry] = []
122
+
123
+ @classmethod
124
+ def register_proxy(cls, adapter_cls: Type[AdapterProxy], criterias: Dict[str, Any]) -> None:
125
+ cls.registered_adapters.append(AdapterProxyFactory.Entry(adapter_cls, criterias.copy()))
126
+
127
+ @classmethod
128
+ def find_proxy_for(cls, adapter: TAdapter) -> TAdapter:
129
+ weights = []
130
+ calculator = WeightCalculator(adapter)
131
+
132
+ for e in cls.registered_adapters:
133
+ weights.append((calculator.calculate(e.criterias), e.proxy_type))
134
+
135
+ if len(weights) > 0:
136
+ last = sorted(weights, key=lambda x: x[0])[-1]
137
+
138
+ if last[0] > 0:
139
+ return cast(TAdapter, last[1](adapter))
140
+
141
+ return adapter
142
+
143
+
144
+ def adapter_proxy_for(
145
+ role: Optional[str] = None,
146
+ framework_id: Optional[str] = None,
147
+ class_name: Optional[str] = None,
148
+ tag_name: Optional[str] = None,
149
+ properties: Optional[Dict[str, str]] = None,
150
+ technology: Optional[Type[Any]] = None,
151
+ native_properties: Optional[Dict[str, str]] = None,
152
+ **decorator_kwargs: Any,
153
+ ) -> Callable[[Type[AdapterProxy]], Type[AdapterProxy]]:
154
+ def decorator(cls: Type[AdapterProxy]) -> Type[AdapterProxy]:
155
+ AdapterProxyFactory.register_proxy(
156
+ cls,
157
+ {
158
+ "role": role,
159
+ "framework_id": framework_id,
160
+ "class_name": class_name,
161
+ "tag_name": tag_name,
162
+ "technology": technology,
163
+ "properties": properties,
164
+ "native_properties": native_properties,
165
+ **decorator_kwargs,
166
+ },
167
+ )
168
+ return cls
169
+
170
+ return decorator