Mobile Testing / Quiz

Selector Forge: UiSelector, Predicates, Class Chains

Writing the platform-native query languages by hand: UiSelector chains, iOS NSPredicate syntax, class chain indexing, and the regex trick for case-insensitive text.

Difficulty
Hard
Format
Quiz
Points
200
Estimate
12 min

// MISSION BRIEF

Your Mission

When accessibility ids are missing and XPath is too slow, the platform-native query languages are the professional fallback: UiAutomator's UiSelector on Android, predicate strings and class chains on iOS. Reading about them is easy. This quiz makes you WRITE them.

Seven questions of authoring-level syntax. Speed bonus active.

// FIRST CONTACT

Battle teaser

AppiumBy.ANDROID_UIAUTOMATOR expects:

  1. AA Kotlin lambda serialized to text
  2. BA CSS selector
  3. CA Java-flavored UiSelector expression as a string, evaluated on-device, e.g. new UiSelector().resourceId("com.shop:id/submit")
  4. DA JSON object of attributes
Answers, scoring, hints, and the full battle stay sealed.

// SKILL TAGS

appiumuiselectorios-predicateclass-chain