Trying to understand how to use Frank - specifically how to test view titles

67 views
Skip to first unread message

Ruby24

unread,
May 6, 2012, 9:02:43 AM5/6/12
to Frank
Hi, I'm very new to Frank (and iOS development too), but I am pretty
determined to find a way to use cucumber to develop my App using BDD.
Frank is obviously my best option, but the lack of documentation is
hurting me.

Specifically, I'm trying to make sure I am on the right scene in my
app. but I can't get it to work

I've tried using the same query that Symbiote uses, but it does not
work, so:

symbiote: navigationItemView marked:"Plan" does flash the title of the
view

but in my step definition:
items = frankly_map("navigationItemView marked:'Plan'", "text")
returns nothing

I can't find any explanations of how frankly_map actually works so its
all trial and error.

Can anyone tell me what I'm doing wrong, or point me at some
documentation that I've missed?

Thanks

Pete Hodgson

unread,
May 7, 2012, 11:53:20 AM5/7/12
to frank-...@googlegroups.com, Frank
Hi, can you try specifying 'shelley_compat' as the selector engine in symbiote and then test the query again? I suspect it'll fail.

I think your ruby code is using Shelley as the selector engine, while symbiote uses Uiquery as the default selector engine (which I should change). Shelley doesn't support all of the shorthand syntax that Uiquery does.

To fix this, you probably need to replace navigationItemView with view:'UINavigationItemView'.

Cheers,
Pete
--
Typed on a little bitty keyboard

Korutech

unread,
May 30, 2012, 10:49:01 PM5/30/12
to frank-...@googlegroups.com
I ran into this exact problem and the solution was:

def check_view_title (nav_title)

title_inspector = "view:'UINavigationItemView' marked:'#{nav_title}'"

view_title = frankly_map(title_inspector, "title")

view_title.should == [nav_title] 

end


So by using "title" instead of "text" it works as expected.

I figured this out by looking at storyboard and seeing what fields were in the attributes list.
Reply all
Reply to author
Forward
0 new messages