본문 바로가기

2. Automation/2.6 Detox

iOS typeText()

TextInput 필드에 텍스트를 입력하기 위해 쓰는 typeText 는 Simulator에서 키패드가 출력되어야함.

await element(by.id(TestIds.browseView.searchTextFiled)).typeText(`bart\n`);


Simulator keyboard toggle 사용 하기


Simulator > Hardware 메뉴 > Keyboard > Toggle Software Keyboard를 선택.



추가적으로 Use the Same keyboard Language as macOS를 킬 경우,


내가 테스트로 입력해야되는 단어 또는 문장이 영어인데, macOS가 한글 키보드 사용중이라, Simulator 의 키보드도 한글로 출력되어 입력이 실패될 가능성이 높음.



추가적으로,TextInput에 입력된 단어 또는 문장을 한꺼번에 지우고 싶을때는 clearText()  를 사용하면 된다!

await element(by.id(TestIds.browseView.searchTextFiled)).clearText();


'2. Automation > 2.6 Detox' 카테고리의 다른 글

Detox iOS System Pop up Control  (0) 2018.08.13
Detox react-native automation testing framework  (0) 2018.05.28