인터랙션

탭, 스와이프, 텍스트 입력, 스크롤 관련 스텝.

tap

요소를 한 번 탭한다.

Parameters

필드타입필수설명
selectorstring탭할 요소 셀렉터

Example

- tap:
    selector: '#submit-button'

Tips

  • iOS: 4가지 orientation 모두 지원 (Portrait, Portrait180, LandscapeA, LandscapeB). xcrun simctl spawn으로 자동 감지하거나 config.orientation으로 강제 지정.
  • Android: orientation 보정 없이 동작.

swipe

요소 위에서 스와이프한다.

Parameters

필드타입필수설명
selectorstring대상 요소 셀렉터
directionstringup | down | left | right
distancenumber | string스와이프 거리. 숫자면 dp, '50%'처럼 문자열이면 요소 크기 대비 비율. 생략 시 기본값 사용

Example

- swipe:
    selector: '#list'
    direction: up
    distance: 200 # 절대값 200dp
- swipe:
    selector: '#carousel'
    direction: left
    distance: '80%' # 요소 너비의 80%

typeText

요소에 텍스트를 입력한다(기존 내용 대체).

Parameters

필드타입필수설명
selectorstring입력 대상 셀렉터
textstring입력할 문자열

Example

- typeText:
    selector: '#email'
    text: user@example.com

inputText

현재 포커스된 필드에 텍스트를 입력한다.

Parameters

필드타입필수설명
textstring입력할 문자열

Example

- inputText:
    text: Hello

longPress

요소를 길게 누른다. tap + duration 래핑으로, YAML 가독성을 위한 별도 스텝.

Parameters

필드타입필수설명
selectorstring길게 누를 요소 셀렉터
durationnumber누르는 시간(ms). 기본 800

Example

- longPress:
    selector: '#item-3'
    duration: 1000

doubleTap

요소를 빠르게 두 번 탭한다.

Parameters

필드타입필수설명
selectorstring탭할 요소 셀렉터
intervalnumber두 탭 사이 간격(ms). 기본 50

Example

- doubleTap:
    selector: '#zoomable-image'
    interval: 100

clearText

TextInput의 텍스트를 전부 지운다.

Parameters

필드타입필수설명
selectorstring대상 TextInput 셀렉터

Example

- clearText:
    selector: '#email'

scrollUntilVisible

스크롤하여 요소가 보일 때까지 반복한다.

Parameters

필드타입필수설명
selectorstring보이게 할 요소 셀렉터
directionstringup | down | left | right. 기본 down
maxScrollsnumber최대 스크롤 횟수. 초과 시 실패

Example

- scrollUntilVisible:
    selector: '#footer'
    direction: down
    maxScrolls: 10