cappuccino/cucapp — pull request #16 by Dogild (2014-10-16 23:02:23+00:00)
Title: New: Added CLI for Cucapp

This pull request add a CLI mode for cucapp. Firslty you need to call the method load_cucapp_CLI(path) to load the file cucumber from the console. Once it's loaded, you can use the different functions as simulate_left_click_on_view to simulate an user action.

The following functions are available :
function simulate_keyboard_event(character, flags)
function simulate_keyboard_events(string, flags)
function simulate_left_click_on_view(aKey, aValue, flags)
function simulate_right_click_on_view(aKey, aValue, flags)
function simulate_double_click_on_view(aKey, aValue, flags)
function simulate_left_click_on_point(x, y, flags)
function simulate_right_click_on_point(x, y, flags)
function simulate_double_click_on_point(x, y, flags)
function simulate_dragged_click_view_to_view(aKey, aValue, aKey2, aValue2, flags)
function simulate_dragged_click_view_to_point(aKey, aValue, x, y, flags)
function simulate_dragged_click_point_to_point(x, y, x1, y2, flags)
function simulate_mouse_moved_on_point(x, y, flags)
function simulate_scroll_wheel_on_view(aKey, aValue, deltaX, deltaY, flags)

For instance to simulate a left click on a button (which have a cucappId set to button-login), you need to call the function like this :
function simulate_left_click_on_view("cucappIdentifier", "button-login")