Nifty Library That Makes Writing UIAutomation Scripts With Javascript Much Simpler

Earlier this year I mentioned an interesting project called Appium based on the Selenium web driver allowing you to write your UIAutomation scripts in a number of languages, but I’m sure many would rather stick with Javascript and UIAutomation rather than use something completely different.

Here’s a submission for those who choose to stick with Javascript from Bao Lei of Hulu for a library called GSAutomation. GSAutomation enhances UIAutomation with an extension/wrapper that makes UIAutomation script creation easier.

To do this GSAutomation provides a very clean array based way to create your tests that mirror human interactions, and a number of helper libraries to make common tasks easier.

Here’s an example from the Hulu Tech Blog showing how you could use GSAutomation to tap a button and check to see a label then displays the correct text.  Notice the clean array based syntax:

task = [
  [Tap, "Button"],
  [Check, "Text I’m expecting", "Text I’m expecting from another label"],
]

 

You can find GSAutomation on Github here.

There’s also an in-depth writeup from Bao Lei over at the Hulu Tech blog.

A nice way to simplify creation of your UIAutomation scripts.

Original article: Nifty Library That Makes Writing UIAutomation Scripts With Javascript Much Simpler

©2013 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Leave a Reply

Your email address will not be published. Required fields are marked *