Created
July 8, 2010 22:09
-
-
Save natritmeyer/468730 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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