By Developers, For Developers

Historical errata for Test iOS Apps with UI Automation

PDF PgPaper PgTypeDescriptionFixed onComments
54SUGGEST

In the assertEqual method, consider using = rather than for the equality check. Triple-equal checks for equal type and equal value, double-equal checks for equal value after coercing the two values into the same type. For example, double equal will report that the digit 1 and the string “1” are equal. This can lead to some very subtle bugs.

2013-03-30Thanks for pointing this out! In the early stages of the book, I toyed with the idea of using a JavaScript linter to help catch edge cases and I had planned to "fix" these assertions when the linter raised this exact complaint about ===. But those ideas ended up on the cutting room floor and I hadn't revisited this section yet. I've put the === in place in these pages and it will appear in the next beta release.
55SUGGEST

In the assertNotEqual method, consider using !== rather than !=.

2013-03-30Fixed the same way as #51146 on page 54. Thanks!
62TYPO

In the last paragraph there is a sentence with “and and” - it should be easy enough to do a text search

2013-04-02
9TYPO

In the second paragraph you have “theme” instead of “them”

2013-04-02
22TYPO

You have the title “Testing With A Modal Alert View” the capital ‘A’ seems a little uncomfortable. Looking at some other titles in the chapter you vary between all caps for the first letter and sometimes using lower case for joining words (which to me seems a little nicer).

2013-04-02Makes sense to me. I'll change it and see what the final copy editor says. :)
10TYPO

The title “Talking The UI Through Javascript” is probably missing a ‘to’ or needs restructuring?

2013-04-02Yup, the "to" fell out.
209TYPO

In paragraph 1, “tap “OK” to create" should be “tap “Add” to create". This will match the actual UIAlert-button in the example app.

2013-04-07
9TYPO

Duplicate ‘if’ in third paragraph: “What happens if if you try to capture gestures”.

2013-04-07
9TYPO

Last paragraph. Hyphenate “long living” and “quickly adapted”.

2013-04-07
27TYPO

Paragraph 2 of section 3.2. Review sentence: “Let’s construct this master script in place and them export it to a file.”

2013-04-07
47TYPO

This first checks to see if the values are equal and exists early if so.

Should read:

This first checks to see if the values are equal and exits early if so.

2013-04-10Thanks! This will be fixed in the next release.
30.. TYPO

There is a large number of places “it’s” is used incorrectly. “It’s” (with the apostrophe) is a conjunction for “it is” or “it has”, whereas when used to show possession, as on p. 30, paragraph 4, “…and try to find one of it’s[sic] cells…”, and p. 54, paragraph 1, “Then, we change it’s[sic] prototype to be…”, it should be “its”, without an apostrophe.

Also appears (as numbered on pdf page):
p. 84: “Now when we run this we see the cell get tapped, the popover slide out of the way, and the map does it’s[sic] thing to search the nearby area.”
p. 89: “Here, we’re going to write scripts to detect the device model and orientation and then use these to help the SearchTermScreen object find the elements it needs to do it’s[sic] job.”
p.99: “We ask that starting element for it’s[sic] subelements and query the UIAElementArray for the first match of the predicate.”
p. 103: “With all the other query methods that UI Automation provides us, we get back a UIAElementNil instance that acts as both a sentinel to stop the script dead in it’s[sic] tracks, and as a placeholder to represent what we were looking for. ”

2013-04-15Thanks! Since the book is in beta, the technical content of the book is still being tweaked and it hasn't gone through the final copy editing phase, yet. Thanks for bearing with us while we continue to clean things up, and thanks for pointing these out! I'm addressing them now and they should be fixed in the next release.
72TYPO

72 Use of apostrophe in “gesture’s” is incorrect in last paragraph:
“Unlike the system wide gesture’s[sic] performed on the UIATarget element, gestures performed on UIAElement objects use relative coordinates instead of screen coordinates.”

2013-04-15
12TYPO

Yes it does! If you choose your device in Xcode, Instruments will launch and attach to the to the app running on the device instead.

->

Yes it does! If you choose your device in Xcode, Instruments will launch and attach to the app running on the device instead.

2013-04-27
19TYPO

“What happens if if you try to capture gestures like swipes or pinches?” : Duplicated “if”.

2013-04-27
196ERROR

In fig. 6, on the third screen from the left “By Recent” should be decorated with circles, not “By name”.

66TYPO

The mobi version comes with no images (see chapter 1 for example)!

26SUGGEST

A suggestion for those running Xcode 5 with iOS 7. The line “app.alert().defaultButton().tap();” doesn’t work and yields the following error: “Script threw an uncaught JavaScript error: Cannot perform action on invalid element: UIAElementNil from target.frontMostApp().alert().defaultButton() on line 21 of add_search_term.js”. Using “app.alert().buttons()[”Add“].tap();” does still work.

26ERROR

Xcode 6 / iOS8
In the first code fragment on page 26, this no longer works:
app.alert().defaultButton().tap();

but this does:
app.alert().buttons()[“Add”].tap();

Categories: