How to handle an iPhone alert with 2 buttons (want to click the non default button)
问题 I am automating an iPhone appplication While I type the mail ID in the TO: field and click on send, I get a confirmation alert with two buttons "Cancel" & "Send". The default button is "cancel". I'm unable to click on the send button. Here is the code snippet which I have used. Please help me with this //Get the handles window = UIATarget.localTarget().frontMostApp().mainWindow(); target = UIATarget.localTarget(); app = target.frontMostApp(); buttons = window.buttons(); target.delay(2); //tap