简体   繁体   中英

Clicking 'Search' and 'Enter' buttons with Detox on ios keyboard

Trying to get Detox to click the 'Search' and 'Enter' buttons on the ios simulator keyboard and am not having much luck. I saw on their git issue page someone recommended using await element(by.label('return')).tap(); but I am having no luck and am not really sure where to start. Wondering if anyone here has had any luck doing so

Cheers

Try adding \\n after the text, the keyboard automatically selects return or enter key command and closes soft keyboard.

await element(by.id("text_input")).toBeVisible();
await element(by.id("text_input")).typeText("type some thing \n")

Refer to this link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM