07 May 2013, 13:55
Bernardsquare_pragsmall

Bernard Farrell (13 posts)

One problem with the UI Automation documentation is that it doesn’t indicate what parts of ‘real’ JavaScript are or are not supported.

This would make a very useful appendix to your book.

Do you know if we can use other libraries with UI Automation? For example Underscore.js, or Prototype.js.

07 May 2013, 17:03
Avatar_pragsmall

Jonathan Penn (43 posts)

Actually, UI Automation supports “real” JavaScript. What we’re used to in the browser and node.js are libraries and extensions that are unique to those environments.

Underscore.js works great. That library is excellent because it is built to work in any pure JavaScript environment like UI Automation.

Prototype requires a document object model so it only works in browsers that it supports.

Same with jQuery.

Someone got the Jasmine test running library working with UI Automation: https://github.com/shaune/jasmine-ios-acceptance-tests

You’re on your own though if they don’t work. UI Automation doesn’t have the same kind of robust debugging environment that you get with, say, the Chrome developer tools. I’ve found it better to use simpler libraries and move slow.

  You must be logged in to comment