Skip to content

Instantly share code, notes, and snippets.

@natritmeyer
Created July 8, 2010 22:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natritmeyer/468730 to your computer and use it in GitHub Desktop.
Save natritmeyer/468730 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'test/unit'
require 'bewildr'
class BewildrTest < Test::Unit::TestCase
def setup
#start the app and wait for the main window
@app, @main_window = Bewildr::Application.start_app_and_wait_for_window("./features/support/BewildrTestApp.exe", /Bewildr/)
end
def test_button_click
@main_window.get(:id => "main_tabs").select("basic") #select the 'basic' tab
#some basic checks on the button
my_button = @main_window.get(:id => "enabled_button")
assert my_button.exists?
assert my_button.enabled?
assert my_button.name == "enabled"
my_button.click #click the button with automation id: 'enabled_button'
#check to see if the button click worked
assert @main_window.get(:id => "enabled_button_message").text == "clicked!"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment