What better tool than Sikuli to use for screen automation on Windows 7 (or preferably multi-platform) [closed]

只愿长相守 提交于 2019-12-02 18:02:50

If you want to automate anything under Windows, I would recommend you Automa - new lightweight GUI automation tool. It simply "finds" UI elements - all you need to do is to provide their names as human user would see them. And it's actually easier to use than Sikuli - you don't have take any screenshots. For instance, if you want to automatically sign in to Windows Live Messenger, you can run the following script:

start("messenger")
write("my.email@domain.com", into="Email address")
write("secret", into="Password")
click("Sign in")

or, similarly, in order to type in credentials and automatically log in to Facebook, all you need to do is execute the following commands:

start("firefox")
write("facebook.com", into="Location")
press(ENTER)
write("my.email@domain.com", into="Email or Phone")
write("secret", into="Password")
click("Log in")

The tool works on most Windows applications (including web browsers), no matter what technology they are written in. It's written in Python and can be used from within any Python application through importable api library.

About Automa vs Sikuli: Automa is as high-level as Sikuli, but does not require screenshots. This has several advantages:

  • Automa scripts are easier to store in a version control system.
  • Automa scripts being purely text based makes them easier to maintain: Imagine a label changing somewhere. This label might appear in several Sikuli screenshots, which you will then have to re-take. With Automa, all you have to do is a simple search-and-replace across files.
  • It is more stable with respect to changes in the user interface - imagine a colour changing or a button moving by just a few pixels.
  • Other nice features such as being able to write the scripts/tests before the application exists - you can always write a script saying click "here", type this, click "there", already from the spec of a feature/program. With screenshots that isn't possible.

Disclosure: I work on Automa.

Are you looking to automate WinForms applications or WPF applications? If you're looking at WPF I can recommend Telerik's free Testing Framework. (Disclosure: I am the Test Studio evangelist for Telerik.)

The testing framework (or the full Test Studio product) work very well with WPF as the scripts/tests are element based, not positional.

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