{ "info": { "author": "\u7f57\u79d1\u5cf0", "author_email": "lkf20031988@163.com", "bugtrack_url": null, "classifiers": [], "description": "# rtsf-win\n\u57fa\u4e8ertsf\u6d4b\u8bd5\u6846\u67b6\uff0c\u5173\u952e\u5b57\u9a71\u52a8Windows UI\u5c42\u9762\uff0c\u8fdb\u884c\u81ea\u52a8\u5316\u7684\u63a7\u5236\u53ca\u529f\u80fd\u6d4b\u8bd5\n\n\n## \u73af\u5883\u51c6\u5907\n\npip install rtsf-win\n\n\n## \u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u6a21\u677f\u57fa\u4e8ertsf\n\n> \u53d8\u91cf\u5f15\u7528-> $var \u5173\u952e\u5b57(\u51fd\u6570)\u5f15\u7528-> ${function}\n\n- \u5e38\u91cf\u7684\u5b9a\u4e49\uff0c glob_var \u548c glob_regx\n- \u6a21\u677f\u5e38\u7528\u7684\u5173\u952e\u5b57\uff0c\u53c2\u89c1 [rtsf](https://github.com/RockFeng0/rtsf)\u4ecb\u7ecd\n\n### \u5982\u4f55\u83b7\u53d6\u63a7\u4ef6\n\n\u8fd0\u884c automation.py -h\n\n![uiautomation-h.png](https://raw.githubusercontent.com/RockFeng0/img-folder/master/rtsf-win-img/uiautomation-h.png)\n\nautomation\u4e2d\u7684\u53c2\u6570\u793a\u4f8b\u5982\u4e0b:\n\nautomation.py -r -d 1 -t 0 ,# print desktop(the root of control tree) and it's children(top level windows) \n\nautomation.py -t 0 -n -m ,# print current active window's controls, show fullname, show more properties\n\nautomation.py -t 3 ,# \u5ef6\u65f63\u79d2\uff0c\u6253\u5370\u5f53\u524d\u6fc0\u6d3b\u7a97\u53e3\u7684\u6811\u5f62\u7ed3\u6784\uff0c\u9ed8\u8ba4\u6df1\u5ea6\u4e3a1; \u6bd4\u5982\uff0c\u6b64\u65f6\u6253\u5f00notepad.exe,\u7b49\u5f85\u4e00\u4f1a\uff0cautomation.py\u4f1a\u6253\u5370Notepad\u7684\u6240\u6709\u63a7\u4ef6\u6811\uff0c\u5e76\u4fdd\u5b58\u5728 @AutomationLog.txt\n\n```\n# \u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\nimport subprocess\nimport uiautomation as automation\n\nprint(automation.GetRootControl())\nsubprocess.Popen('notepad.exe')\nnotepadWindow = automation.WindowControl(searchDepth = 1, ClassName = 'Notepad')\nprint(notepadWindow.Name)\nnotepadWindow.SetTopmost(True)\nedit = notepadWindow.EditControl()\nedit.SetValue('Hello')\nedit.SendKeys('{Ctrl}{End}{Enter}World')\nnotepadWindow.Close()\nnotepadWindow.ButtonControl(Name=u'\u4fdd\u5b58(S)').Invoke()\nnotepadWindow.EditControl(Name=\"\u6587\u4ef6\u540d:\",AutomationId=\"1001\").SetValue(r'c:\\test dir')\nnotepadWindow.ButtonControl(Name=\"\u53d6\u6d88\").Invoke()\nnotepadWindow.Close()\nnotepadWindow.ButtonControl(Name=u'\u4e0d\u4fdd\u5b58(N)').Invoke()\n```\n\n\u5173\u4e8euiautomation\u7684\u5de5\u4f5c\u539f\u7406\uff0c\u53c2\u89c1[\u8be6\u7ec6\u4ecb\u7ecd](http://www.cnblogs.com/Yinkaisheng/p/3444132.html)\n\n\u53e6\u5916\u4e00\u4e2a UI\u5de5\u5177, [Inspect.exe](https://docs.microsoft.com/zh-cn/windows/desktop/WinAuto/inspect-objects) \u7531 Microsoft\u652f\u6301,\u4e5f\u80fd\u904d\u5386windows UI\u5143\u7d20\u3002 \u4e0d\u540c\u7684\u662f\uff0c\u8be5\u5de5\u5177\u6709\u754c\u9762\uff0c\u800cautomation\u662f\u4e2a\u7ec8\u7aef\u8f93\u51fa\u3002\u4e0d\u8fc7\uff0c\u4e60\u60ef\u4e86automation\uff0c\u4f60\u4f1a\u53d1\u73b0\u66f4\u65b9\u4fbf\n\n![inspect-exe.png](https://raw.githubusercontent.com/RockFeng0/img-folder/master/rtsf-win-img/inspect-exe.png)\n\n\n### \u57fa\u672c\u7528\u4f8b\n\n\u57fa\u672c\u7528\u4f8b\uff0c\u662f\u6307\u6ca1\u6709\u5206\u5c42\u7684\u60c5\u51b5\u4e0b\uff0c\u7b80\u5355\u7684\u6d4b\u8bd5\u7528\u4f8b\n\n```\n# test_case.yaml\n# yaml\u6d4b\u8bd5\u7528\u4f8b\uff0c\u6a21\u578b\u793a\u4f8b:\n- project:\n name: xxx Window\n module: xxx\u6a21\u5757-\u529f\u80fd\u6d4b\u8bd5\n\n- case:\n # id desc \u9009\u586b\uff0c\u975e\u7ea6\u5b9a\u5b57\u6bb5\n id: ATP-1\n desc: \u6d4b\u8bd5\u7528\u4f8b-\u6a21\u677f\u683c\u5f0f\u7684\u8bbe\u8ba1-\u6a21\u677f\uff08\u5168\u5b57\u6bb5\uff09\n\n # name \u5fc5\u586b\uff0c\u9700\u786e\u4fdd\u552f\u4e00\u6027\n name: windows_ui_auto_test_demo_1\n\n # responsible \u9009\u586b\n responsible: rockfeng0\n\n # tester \u9009\u586b\n tester: rockfeng0\n\n # \u5b9a\u4e49\u6b63\u5219\u8868\u8fbe\u5f0f, \u5b9a\u4e49\u7684\u5b57\u7b26\u4e32\u4e0d\u4f1a\u89e3\u6790,\u9009\u586b\n glob_regx:\n rex_open_file: '(\u6587\u4ef6\u540d.*)'\n rex_hello: 'Hello'\n\n # \u5b9a\u4e49\u53d8\u91cf\uff0c \u6548\u679c\u540c SetVar(name, value),\u9009\u586b\n glob_var:\n program: C:\\Windows\\System32\\notepad.exe\n title: \u65e0\u6807\u9898 - \u8bb0\u4e8b\u672c\n keys: '{Ctrl}{End}{Enter}World'\n text_hello: 'Hello'\n text_save: '\u4fdd\u5b58(S)'\n text_file_path: 'c:\\some test dir'\n text_unsave: '\u4e0d\u4fdd\u5b58(N)'\n\n # pre_command \u9009\u586b\n pre_command:\n - ${StartApplication($program)}\n - ${TimeSleep(2)}\n - ${SwitchToRootControl()}\n\n # steps \u5fc5\u586b\n steps: \n\n # \u5728windows\u4e2d\uff0c\u5b9a\u4f4d\u5143\u7d20 \n - windriver:\n ControlType: WindowControl\n ClassName: Notepad\n Depth: 1\n index: 1\n timeout: 10\n action: ${ActivateWindow()}\n\n - windriver:\n action: ${MoveWindowPos(400, 400)}\n\n - windriver:\n action: ${VerifyProperty(Name, $title)}\n\n - windriver:\n action: ${TimeSleep(2)} \n\n - windriver:\n action: ${SwitchToCurrentControl()}\n\n - windriver:\n action: ${SetSearchProperty(ControlType=EditControl, ClassName=Edit)}\n\n - windriver:\n action: ${DyPropertyData(class_name, ClassName)}\n\n - windriver:\n action: ${VerifyVar(class_name, Edit)} \n\n - windriver:\n action: ${SetValue(Hello)}\n\n - windriver: \n action: ${SendKeys($keys)}\n\n # post_command \u9009\u586b\n post_command:\n - ${DyTextData(text, $rex_hello)}\n\n # verify \u9009\u586b\n verify:\n - ${VerifyVar(text, $text_hello)} \n\n```\n\n### \u5206\u5c42\u7528\u4f8b\n\n- \u5206\u5c42\u7528\u4f8b\uff0c\u662f\u6307\u6a21\u5757\u529f\u80fd\u6d4b\u8bd5\u7684\u65f6\u5019\uff0c\u5bf9\u6d4b\u8bd5\u7528\u4f8b\u8fdb\u884c\u5206\u5c42\uff0c\u6700\u5c0f\u7684\u5355\u5143\u4e3aapi\uff0c\u5176\u6b21\u4e3asuite\uff0c\u6700\u540e\u7ec4\u6210\u7528\u4f8b\n- \u5176\u5b58\u653e\u8def\u5f84\u3001\u7f16\u5199\u89c4\u5219\u7b49\uff0c\u8be6\u89c1 [rtsf](https://github.com/RockFeng0/rtsf)\u76f8\u5173\u4ecb\u7ecd\n- \u793a\u4f8b\u53ef\u4ee5\uff0c\u53c2\u89c1[rtsf-http](https://github.com/RockFeng0/rtsf-http)\u76f8\u5173\u4ecb\u7ecd\n\n\n## \u6267\u884c\u6d4b\u8bd5\u7528\u4f8b\n\n### windriver \u547d\u4ee4\n\n```\n# \u67e5\u770b\u5e2e\u52a9 -h \nwindriver -h\n\n# \u6267\u884c\u6d4b\u8bd5\u7528\u4f8b\nwindriver C:\\f_disk\\BaiduNetdiskDownload\\rtsf-win\\tests\\data\\test_case.yaml\n```\n\n## \u6d4b\u8bd5\u62a5\u544a\u53ca\u65e5\u5fd7\n\n> \u6267\u884c\u7ed3\u675f\u540e\uff0c\u6d4b\u8bd5\u7528\u4f8b\u6240\u5728\u8def\u5f84\uff0c\u5c31\u662freport\u751f\u6210\u7684\u8def\u5f84\n\n\n\n## \u5c01\u88c5\u7684\u5173\u952e\u5b57(\u5185\u7f6e\u51fd\u6570)\n\n\u5173\u952e\u5b57\u7684\u4f7f\u7528\uff0c\u5728\u524d\u9762\uff0c\u6709\u4ecb\u7ecd\uff0c\u89c4\u5219\u5982\u4e0b\n> \u53d8\u91cf\u5f15\u7528-> $var \u5173\u952e\u5b57(\u51fd\u6570)\u5f15\u7528-> ${function}\n\n### \u5143\u7d20\u5b9a\u4f4d\u76f8\u5173\u64cd\u4f5c\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
WinElement methods\u53c2\u6570\u53c2\u6570\u7c7b\u578b\u63cf\u8ff0
SetSearchProperty(**kwargs)ControlTypestr or unicodealways suggest to use, because some ControlType has special pattern functions
ClassNamestr or unicode\u63a7\u4ef6ClassName
AutomationIdstr or unicode\u63a7\u4ef6AutomationId
Namestr or unicode\u63a7\u4ef6Name
SubNamestr or unicode\u63a7\u4ef6SubName
RegexNamestr or unicode, supports regex\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u7528\u4e8e\u63a7\u4ef6Name
Depthinteger\u63a7\u4ef6\u641c\u7d22\u7684\u6df1\u5ea6\uff0c\u9ed8\u8ba4\u662f\u6700\u5927\u503c:260
SwitchToCurrentControl()\u5207\u6362\u5230\u5f53\u524d\u63a7\u4ef6\uff0c\u4ee5\u6b64\u4f5c\u4e3a\u641c\u7d22\u7684\u6839\u63a7\u4ef6. **\u914d\u5408SetSearchProperty\u4f7f\u7528**
SwitchToRootControl()\u5207\u6362\u5230\u6839\u63a7\u4ef6(\u684c\u9762)\uff0c\u4ee5\u6b64\u4f5c\u4e3a\u641c\u7d22\u7684\u6839\u63a7\u4ef6. **\u914d\u5408SetSearchProperty\u4f7f\u7528**
\n\n\n### WinContext methods --> \u7528\u4e8e\u4e0a\u4e0b\u6587\u7ba1\u7406\n```\nDyPropertyData(var, attr) # -> \u5c5e\u6027-\u52a8\u6001\u5b58\u50a8\u53d8\u91cf\uff0c\u9002\u7528\u4e8e\uff0c\u4fdd\u5b58UI\u5143\u7d20\u5c5e\u6027\u503c\u3002var-\u53d8\u91cf\u540d\u79f0\uff0cattr\u4e3aUI\u5143\u7d20\u7684\u5c5e\u6027\u540d\u79f0\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nDyTextData(var, regx, index) # -> \u5b57\u7b26\u4e32-\u52a8\u6001\u5b58\u50a8\u53d8\u91cf\uff0c\u9002\u7528\u4e8e\uff0c\u4fdd\u5b58\u6587\u672c\u63a7\u4ef6\u4e2d\u6307\u5b9a\u7684\u503c\u3002 var-\u53d8\u91cf\u540d\u79f0\uff0cregx\u5df2\u7f16\u8bd1\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\uff0cindex\u6307\u5b9a\u7d22\u5f15\uff0c\u9ed8\u8ba40\n\nGetVar(name) # -> \u83b7\u53d6\u6307\u5b9a\u53d8\u91cf\u7684\u503c\nSetVar(name,value) # -> \u8bbe\u7f6e\u6307\u5b9a\u53d8\u91cf\u7684\u503c\n```\n\n### WinWait methods --> \u7528\u4e8e\u65f6\u95f4\u7684\u63a7\u5236\n```\nTimeSleep(seconds) # -> \u6307\u5b9a\u7b49\u5f85\u65f6\u95f4(\u79d2\u949f)\nWaitForExist(timeout) # -> \u7b49\u5f85\u5143\u7d20\uff0ctimeout\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4\uff0c\u5355\u4f4d\u79d2\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nWaitForDisappear(timeout) # -> \u7b49\u5f85\u5143\u7d20\u6d88\u5931\uff0ctimeout\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4\uff0c\u5355\u4f4d\u79d2\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\n```\n\n### WinVerify methods --> \u7528\u4e8e\u9a8c\u8bc1\n```\nVerifyVar(name, expect_value) # -> \u9a8c\u8bc1\u53d8\u91cf\u503c\uff0c\u53d8\u91cfname\u7684\u503c\u662fexpect_value\nVerifyProperty(attr, expect_value) # -> \u9a8c\u8bc1\u5143\u7d20\u5c5e\u6027attr\u7684\u503c\uff0c\u5305\u542b\u503cexpect_value,**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nVerifyKeyboardFocusable() # -> \u9a8c\u8bc1\u8be5\u63a7\u4ef6\u662f\u5426\u53ef\u88ab\u952e\u76d8\u805a\u7126\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nVerifyKeyboardFocused() # -> \u9a8c\u8bc1\u8be5\u63a7\u4ef6\u5df2\u88ab\u952e\u76d8\u805a\u7126\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nVerifyElemEnabled() # -> \u9a8c\u8bc1\u8be5\u63a7\u4ef6\u5df2\u542f\u7528\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nVerifyNotExist() # -> \u9a8c\u8bc1\u8be5\u63a7\u4ef6\u4e0d\u5b58\u5728\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\n```\n\n### WinActions methods --> \u7528\u4e8eWindows UI\uff08WPF or MFC\uff09\u64cd\u4f5c\n```\n\nStartApplication(app_path) # -> \u8fd0\u884c\u6307\u5b9a\u8def\u5f84\uff08app_path\uff09\u7684\u5e94\u7528\u7a0b\u5e8f\nSetWinStat(state) # -> \u8bbe\u7f6ewindow\u7a97\u53e3\u72b6\u6001\uff0c\u503c\uff1aNormal\u3001Maximize\u3001Minimize\u3002\u96b6\u5c5eWindowPattern\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nActivateWindow() # -> \u6fc0\u6d3bwindow\u7a97\u53e3\u5e76\u8bbe\u7f6e\u7126\u70b9\u3002\u96b6\u5c5eWindowPattern\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nSetTopmost(is_top_most) # -> \u8bbe\u7f6ewindows\u7a97\u53e3\u662f\u5426\u7f6e\u9876\uff0cis_top_most\u9ed8\u8ba4\u4e3aTrue\u3002\u96b6\u5c5eWindowPattern\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nMoveWindowPos(x, y) # -> \u79fb\u52a8windows\u7a97\u53e3\uff0c\u9ed8\u8ba4(x=-1,y=-1)\u79fb\u52a8\u5230\u5c4f\u5e55\u4e2d\u5fc3\u3002\u96b6\u5c5eWindowPattern\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nCloseWin() # -> \u5173\u95edwindows\u7a97\u53e3\u3002\u96b6\u5c5eWindowPattern\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nInvoke() # -> \u89e6\u53d1\u63a7\u4ef6Invoke\u4e8b\u4ef6\uff0c\u7c7b\u4f3c\u4e8e\u70b9\u51fb\u3002\u96b6\u5c5eInvokePattern\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nSetValue(value) # -> \u89e6\u53d1\u63a7\u4ef6SetValue\u4e8b\u4ef6\uff0c\u7c7b\u4f3c\u4e8e\u8bbe\u7f6e\u6587\u672c\u503c\u3002\u96b6\u5c5eValuePattern\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nCurrentValue() # -> \u89e6\u53d1\u63a7\u4ef6CurrentValue\u4e8b\u4ef6\uff0c\u7c7b\u4f3c\u4e8e\u83b7\u53d6\u6587\u672c\u503c\u3002\u96b6\u5c5eValuePattern\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nScrollTo(horizontalPercent,verticalPercent) # -> \u89e6\u53d1\u63a7\u4ef6ScrollTo\u4e8b\u4ef6\uff0c\u53c2\u6570\u503c\u4e3a\u6a2a\u7eb5\u767e\u5206\u6bd4\u533a\u95f4(0,100)\uff0c\u7c7b\u4f3c\u6eda\u52a8\u6eda\u52a8\u6761\u3002\u96b6\u5c5eScrollPattern\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528** \nCheckOn() # -> \u89e6\u53d1\u63a7\u4ef6CheckOn\u4e8b\u4ef6\uff0c\u52fe\u9009\u590d\u9009\u6846\u3002\u96b6\u5c5eTogglePattern\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528** \nCheckOff() # -> \u89e6\u53d1\u63a7\u4ef6CheckOff\u4e8b\u4ef6\uff0c\u53d6\u6d88\u52fe\u9009\u590d\u9009\u6846\u3002\u96b6\u5c5eTogglePattern\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nExpandOn() # -> \u89e6\u53d1\u63a7\u4ef6ExpandOn\u4e8b\u4ef6\uff0c\u5c55\u5f00\u4e0b\u62c9\u6846\u3002\u96b6\u5c5eExpandCollapsePattern\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nExpandOff() # -> \u89e6\u53d1\u63a7\u4ef6ExpandOff\u4e8b\u4ef6\uff0c\u6536\u8d77\u4e0b\u62c9\u6846\u3002\u96b6\u5c5eExpandCollapsePattern\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528** \nSelectItem() # -> \u89e6\u53d1\u63a7\u4ef6SelectItem\u4e8b\u4ef6\uff0c\u5728\u7ec4\u5408\u6846\u3001 \u5217\u8868\u6846\u3001\u9009\u9879\u5361\u7b49\u5c55\u5f00\u64cd\u4f5c\u540e\uff0c\u9009\u62e9\u6761\u76ee\u3002\u96b6\u5c5eSelectionItemPattern\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nClick(ratioX,ratioY,simulateMove) # -> \u5728\u6307\u5b9a\u63a7\u4ef6\u4e2d\uff0c\u9f20\u6807\u5de6\u952e\u5355\u51fb\uff0c\u53c2\u6570\u90fd\u6709\u9ed8\u8ba4\u503c\u3002\u96b6\u5c5eWin32API\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\n \u793a\u4f8b\u5982\uff1a\n Click(): click center and move cursor to control smoothly\n Click(10, 10): click left+10, top+10\n Click(-10, -10): click right-10, bottom-10\n simulateMove: bool, if True, first move cursor to control smoothly\n\nDoubleClick(ratioX,ratioY,simulateMove) # -> \u5728\u6307\u5b9a\u63a7\u4ef6\u4e2d\uff0c\u9f20\u6807\u5de6\u952e\u53cc\u51fb\uff0c\u7528\u6cd5\u540cClick\u3002\u96b6\u5c5eWin32API\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nWheelDown(times) # -> \u5728\u6307\u5b9a\u63a7\u4ef6\u4e2d\uff0c\u6eda\u8f6e\u5411\u4e0b\u6ed1\u52a8\u51e0\u6b21\uff0ctimes\u53c2\u6570\u4e3a\u6574\u6570\u3002\u96b6\u5c5eWin32API\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nWheelUp(times) # -> \u5728\u6307\u5b9a\u63a7\u4ef6\u4e2d\uff0c\u6eda\u8f6e\u5411\u4e0a\u6ed1\u52a8\u51e0\u6b21\uff0ctimes\u53c2\u6570\u4e3a\u6574\u6570\u3002\u96b6\u5c5eWin32API\uff0c**\u914d\u5408SetSearchProperty\u4f7f\u7528**\nSendKeys(text) # -> \u5728\u6307\u5b9a\u7a7a\u95f4\u4e2d\uff0c\u6a21\u62df\u53d1\u9001keys,\n \u793a\u4f8b\u5982\uff1a\n #press Ctrl+a, Delete, Ctrl+v, Ctrl+s, Ctrl+Shift+s, Win+e, PageDown\n SendKeys('{Ctrl}a{Delete}{Ctrl}v{Ctrl}s{Ctrl}{Shift}s{Win}e{PageDown}')\n\n #press Ctrl+A+B, type (, press Shift+1+2+3, type ), if () follows a hold key, hold key won't release util ) \n SendKeys('{Ctrl}(AB)({Shift}(123))')\n\n #press Ctrl+a at the same time, release Ctrl+a, then type a 2 times \n SendKeys('{Ctrl}{a 3}')\n\n #type a 3 times, type B 5 times \n SendKeys('{a 3}{B 5}') \n\n #type: {Hello}abc abc test}}}!a ()()\n SendKeys('{{}Hello{}}abc {a}{b}{c} test{} 3}{!}{a} (){(}{)}')\n SendKeys('0123456789{Enter}')\n SendKeys('ABCDEFGHIJKLMNOPQRSTUVWXYZ{Enter}')\n SendKeys('abcdefghijklmnopqrstuvwxyz{Enter}')\n SendKeys('`~!@#$%^&*()-_=+{Enter}')\n SendKeys('[]{{}{}}\\\\|;:\\'\\\",<.>/?{Enter}')\n\n```\n\n\n## \u81ea\u5b9a\u4e49\uff0c\u5173\u952e\u5b57(\u51fd\u6570\u3001\u53d8\u91cf)\n> \u5728case\u540c\u7ea7\u76ee\u5f55\u4e2d\uff0c\u521b\u5efa preference.py, \u8be5\u6587\u4ef6\u6240\u5b9a\u4e49\u7684 \u53d8\u91cf\u3001\u51fd\u6570\uff0c\u53ef\u4ee5\u88ab\u52a8\u6001\u52a0\u8f7d\u548c\u5f15\u7528\n\n\u6267\u884c\u7528\u4f8b\u7684\u65f6\u5019\uff0c\u53ef\u4ee5\u4f7f\u7528 \u53d8\u91cf\u5f15\u7528 \u6216\u8005\u5173\u952e\u5b57\u5f15\u7528\u7684\u65b9\u6cd5\uff0c\u8c03\u7528\uff0c\u81ea\u5b9a\u4e49\u7684\u51fd\u6570\u548c\u53d8\u91cf\n\n```\n# preference.py \u793a\u4f8b\n\ntest_var = \"hello rtsf.\"\ndef test_func():\n return \"nihao rtsf.\"\n\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/RockFeng0/rtsf-win", "keywords": "test win ui", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "rtsf-win", "package_url": "https://pypi.org/project/rtsf-win/", "platform": "", "project_url": "https://pypi.org/project/rtsf-win/", "project_urls": { "Homepage": "https://github.com/RockFeng0/rtsf-win" }, "release_url": "https://pypi.org/project/rtsf-win/1.2.1/", "requires_dist": [ "uiautomation", "rtsf" ], "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "summary": "only for windows UI test, base on rtsf. e.g. WPF UI or MFC UI", "version": "1.2.1" }, "last_serial": 4448724, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "4c2e801d93d20e26798f52017bb78d1a", "sha256": "8b85bc332fc3a03cb9b7ea36fe4680b26467e8de68fb1a6c8de3064458e11cfe" }, "downloads": -1, "filename": "rtsf_win-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4c2e801d93d20e26798f52017bb78d1a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 8861, "upload_time": "2018-10-12T10:15:17", "url": "https://files.pythonhosted.org/packages/3b/cf/7bf6de4ed551e6437a2d482af69a1937dafadb4a4f74b47e1af985109534/rtsf_win-1.0-py3-none-any.whl" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "89d4dca1c6b0cf482c1e87cf46704f6b", "sha256": "ff3033063dd99bc8ef973ae464d4af28c6c3a3ebb47c10145cdafc714dd7333d" }, "downloads": -1, "filename": "rtsf_win-1.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "89d4dca1c6b0cf482c1e87cf46704f6b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 13682, "upload_time": "2018-11-04T02:28:06", "url": "https://files.pythonhosted.org/packages/0b/86/c0905f098fbe945dc389f59d989490dc6ae0453ceda6b0837b1987f1d8b8/rtsf_win-1.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d23b1d9c23ad82f40bafe7d029828ecd", "sha256": "601a25505909f9e89e751f47005cd28c35525175866c41b845d783a3efd451e2" }, "downloads": -1, "filename": "rtsf-win-1.2.1.tar.gz", "has_sig": false, "md5_digest": "d23b1d9c23ad82f40bafe7d029828ecd", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 14073, "upload_time": "2018-11-04T02:28:08", "url": "https://files.pythonhosted.org/packages/8c/55/625237b5e8949534f561756b8d2f076c91e83ab5779e2eb82fa5bf29d864/rtsf-win-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "89d4dca1c6b0cf482c1e87cf46704f6b", "sha256": "ff3033063dd99bc8ef973ae464d4af28c6c3a3ebb47c10145cdafc714dd7333d" }, "downloads": -1, "filename": "rtsf_win-1.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "89d4dca1c6b0cf482c1e87cf46704f6b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 13682, "upload_time": "2018-11-04T02:28:06", "url": "https://files.pythonhosted.org/packages/0b/86/c0905f098fbe945dc389f59d989490dc6ae0453ceda6b0837b1987f1d8b8/rtsf_win-1.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d23b1d9c23ad82f40bafe7d029828ecd", "sha256": "601a25505909f9e89e751f47005cd28c35525175866c41b845d783a3efd451e2" }, "downloads": -1, "filename": "rtsf-win-1.2.1.tar.gz", "has_sig": false, "md5_digest": "d23b1d9c23ad82f40bafe7d029828ecd", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 14073, "upload_time": "2018-11-04T02:28:08", "url": "https://files.pythonhosted.org/packages/8c/55/625237b5e8949534f561756b8d2f076c91e83ab5779e2eb82fa5bf29d864/rtsf-win-1.2.1.tar.gz" } ] }