Mobile Testing / Quiz

Scroll Ops: mobile: Commands and UiScrollable

scrollGesture and its boolean verdict, the swipe-vs-scroll direction trap, UiScrollable one-liners, and iOS mobile: scroll with toVisible.

Difficulty
Medium
Format
Quiz
Points
150
Estimate
9 min

// MISSION BRIEF

Your Mission

The element you need is three screens down. Every mobile framework has an answer, and each answer has a trap: directions that mean opposite things, gestures that overshoot, one-liners that scroll AND find. This quiz covers the scroll toolbox that mobile test authors reach for daily.

Six questions. Speed bonus active.

// FIRST CONTACT

Battle teaser

driver.execute_script('mobile: scrollGesture', {...}) on UiAutomator2 takes:

  1. AOnly a pixel pair: start and end coordinates
  2. BA CSS selector to scroll to
  3. CNo arguments; it always scrolls one page down
  4. DAn area (left/top/width/height) or an elementId, plus direction and percent, and RETURNS a boolean: whether more scrolling is possible, so you can loop until the target appears or the scroll runs dry
Answers, scoring, hints, and the full battle stay sealed.

// SKILL TAGS

appiumgesturesuiscrollablemobile-commands