Get Updates By E-mail 

Article Written By:
Johann Dowa

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.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments