Interacting with UIAlertView via Frank

49 views
Skip to first unread message

Martin Taylor

unread,
May 16, 2013, 3:34:46 PM5/16/13
to frank-...@googlegroups.com
I just read through the previous thread: Can't inspect the UIAlertView using frank-cucumber 1.1.0
and it seems that a fix was provided that helped people click a UIAlertView button, but I can't interact with the UIAlertView at all.

In my situation, clicking on a "Restore" button in a regular dialog box pops a UIAlertView dialog to confirm or cancel the "Restore settings to factory defaults" operation.  The screen really looks like this (except for the bug where it tried to capture a landscape screen in portrait format, but that's a different thread):

But when you view the iPad via Symbiote, it only sees this:

And, as you can see from the pink error message in the Symbiote window, the Frankified app running on the iPad is not seeing the UIAlertView.  This means that, via Frank, I cannot only not touch the OK or Cancel buttons, I can't even recognize that the UIAlertView named "DLG AFW - Restore Defaults" is present on the screen.  Since Symbiote can see the UIAlertView I have some hope that there's a way for Frank to see and interact with it, but I'm not sure what it will take to make it work.  Do I need to change something in my selectors, or does the in-app Frank code need to be changed in some way to recognize and deal with a UIAlertView like this?

Thanks,

Martin

P.S. Despite what was said about "a fix" in the previous thread: Can't inspect the UIAlertView using frank-cucumber 1.1.0 it seems that both Symbiote and /screenshot/allwindows-rotated still don't know how to capture and display a screen correctly when the iPad is in landscape and a UIAlertView is displayed.

Ondrej Hanslik

unread,
May 16, 2013, 3:55:08 PM5/16/13
to frank-...@googlegroups.com
I can reproduce the screenshot bug. That's pretty easy to fix. 

Unfortunately, symbiote shows only the key window (/screenshot), so you can see only the alert which is becoming the new key window.

How do your selectors look like when you are trying to touch the alert buttons? Trying "button marked:'Cancel' works for my alerts.  

Martin Taylor

unread,
May 16, 2013, 4:37:57 PM5/16/13
to frank-...@googlegroups.com
Sorry to mislead... I messed up the selector in Symbiote.

Trying again with Symbiote, using the EXACT selector that I use in my Frank client code, when I use: 
    view marked:'DLG'
Symbiote flashes both the "Document Settings" dialog and the "Restore Defaults" alert dialog.  This is why I expected Frank to return 2 strings when I call:
    viewNames = frankly_map("view marked:'DLG'", 'accessibilityLabel')
but the resulting viewNames with Frank is ONLY the accessibilityLabel of the "Document Settings" dialog.  It doesn't seem to recognize the "Restore Defaults" alert dialog like Symbiote does.

So what's the difference between doing this in Frank and doing it via Symbiote?  I thought they were essentially calling the same on-iPad code?

Thanks,
Martin

Ondrej Hanslik

unread,
May 16, 2013, 5:26:09 PM5/16/13
to frank-...@googlegroups.com
I have fixed the screenshots.

I am sure there is absolutely no difference between selectors in ruby and symbiote
Reply all
Reply to author
Forward
0 new messages