iOS UI automation: Handling alertViews when the length of textbox is exceeded -



iOS UI automation: Handling alertViews when the length of textbox is exceeded -

i new ios auto tool. have text-box length 20 letters. when trying type more 20, such 21 letters, error shown like: "length exceeded", having 1 "ok" button , after error, tap on ok button dismiss pop up, , if wanna save change, tap on save button. script this:

target.frontmostapp().mainwindow().tableviews()[2].cells()[0].tap();// name target.frontmostapp().keyboard().typestring("mmmmmmmmmmmmmmmmmmmn"); target.delay( 5 ); uiatarget.onalert = function onalert(alert){ var title = alert.name(); uialogger.logwarning("alert title' " + title + " ' encountered!"); if (title == "error") { alert.buttons()["ok"].tap(); homecoming true; // bypass default handler } homecoming false; // utilize default handler } target.frontmostapp().navigationbar().buttons()["save"].tap()

but script stops right after typing more 20 letters (line 2) , cant move next line. please give me thought this. give thanks much.

one thing,

basically "everyone" uses https://github.com/jdg/mbprogresshud

mbprogresshud

it's you'll need in app; , takes care of problem describe. so, first chance "add popular library" app!

ios automation

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -