pywinauto can it be made cross platform

江枫思渺然 提交于 2019-12-11 10:10:39

问题


My Python application has windows is client and server as Linux. My aim is to automate windows GUI application with pywinauto from Linux server.

Can pywinauto be made cross platform?


回答1:


It's not possible using pywinauto immediately. But you may copy pywinauto script to the target Windows machine and run it remotely using Jenkins, for example. Or any other CI server. Master node can be on Linux. So Windows node can run as a slave. But there are several requirements for the Windows slave (this check list is based on my recent experience).

  • Windows slave can be set up with auto logon.
  • VNC server software (TightVNC or UltraVNC, for example) should be installed.
  • Video card drivers should be up-to-date for better screen resolution (and for black screen prevention).
  • Jenkins slave process must run as not a service (i.e. in the existing desktop, so Jenkins task would have an access to the GUI). Just do NOT click menu "Run as a service" in JNLP agent window.
  • Do not use Remote Desktop connection from another Windows machines (reboot may be required to restore GUI session with VNC client/server pair).
  • Of course, Python+pywinauto must be installed on Windows node. Just in case.
  • If UAC is enabled on Windows node, in some cases it should be disabled (if you have to deal with admin access like GUI installers do).

On Linux you need to set up the VNC client and Jenkins. For other CI servers steps may be similar but with some differences.



来源:https://stackoverflow.com/questions/35123530/pywinauto-can-it-be-made-cross-platform

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!