How to know what I can do with step_definitions?

Skip to first unread message

Brant Merryman

Mar 12, 2015, 5:26:13 PM3/12/15
Hi. I'm wanting to test a MacOS X app under Yosemite using Frank.

Is there a reference anywhere that shows how to perform operations appropriate for a Mac app?

For example, changing the value of a control, determining what window is the front window, etc? Is there anyplace where there might be a set of example frank cucumber tests for Mac? I am seeing examples that say things like:

When /^I navigate to "(.*?)"$/ do |tab_name|
touch "view:'UITabBarButton' marked:'#{tab_name}'"

But when I substitute something like this and the simulate_click does not work, but if I leave out 'NSMenuItem' it opens the preferences. Is there a good way to determine why this is and maybe a reference that says what you can and can't do?

When(/^I choose Preferences menu item$/) do
simulate_click "view: 'NSMenuItem' marked:'Preferences…'"

Michael Buckley

Mar 12, 2015, 10:40:12 PM3/12/15
Hi, there's a bit of documentation at but you can get more information by reading rubydoc documentation that comes installed with Frank, and is available on the Web at

Specifically, you want to look at the *Helper classes.

As for your specific menu problem, the problem is that you have a space between "view:" and "'NSMenuItem'". This should work for you.

simulate_click "view:'NSMenuItem' marked:'Preferences…'"

You received this message because you are subscribed to the Google Groups "Frank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Reply all
Reply to author
0 new messages