/AXMagicIdentifiers

Categories that automagically adds accessibility identifiers to key objects for test automation

Primary LanguageObjective-CMIT LicenseMIT

AXMagicIdentifiers

CI Status Version License Platform

Usage

Please, update to version 1.0.6. Older versions had a bug where some delegate methods for UITableViews and UICollectionViews were not being called.

Just import the magical header in your pch file and you are done. Keep in mind that this pod should not be used in production release.

#import <AXMagicIdentifiers.h>

What this does:

From now on, lets call accessibilityIdentifier property as accID.

  • Top levem UIViews have accID set as 'CLASS_NAME'_VIEW.

  • UITableViewCells have accID set as 'CLASS_NAME'_CELL_S'SECTION_NUMBER'R'ROW_NUMBER'.

  • UICollectionViewCells have accID set as 'CLASS_NAME'_CELL_S'SECTION_NUMBER'R'ROW_NUMBER'.

  • UIButtons have accID set as 'CLASS_NAME'BUTTON'BUTTON_TITLE'.

  • UIButtons will auto update accID when button title changes.

  • UITextView have accID set as 'CLASS_NAME'TXTVIEW'INDEX'.

  • UITextField have accID set as 'CLASS_NAME'TFIELD'INDEX'.

  • UIPageControll have accID set as 'CLASS_NAME'PAGEC'INDEX'.

  • UIPickerView have accID set as 'CLASS_NAME'PVIEW'INDEX'.

  • UISwitch have accID set as 'CLASS_NAME'SWITCH'INDEX'.

  • Wont change accID if already set.

Supports iOS >= 7.0

Installation

AXMagicIdentifiers is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "AXMagicIdentifiers", :configuration => ['Debug']

Author

Alexandre Garrefa, alexmrg@gmail.com

License

AXMagicIdentifiers is available under the MIT license. See the LICENSE file for more info.