Skip to content

Instantly share code, notes, and snippets.

@leviwilson
Created May 13, 2013 02:04
Show Gist options
  • Save leviwilson/5565746 to your computer and use it in GitHub Desktop.
Save leviwilson/5565746 to your computer and use it in GitHub Desktop.
An example of how to call down into Solo::clickOnActionBarItem(int) using Gametel.
class SomeScreen
include Gametel
def click_menu_item(which)
platform.chain_calls do |d|
# get the id of the menu item, store it in @@id@@
d.id_from_name which, :target => :Brazenhead, :variable => '@@id@@'
# give the @@id@@ back to Robotium to click on the menu option
d.click_on_action_bar_item '@@id@@', :target => :Robotium
end
end
end
screen = SomeScreen.new
screen.click_menu_item :action_edit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment