Hi Bret
This is one sample testcase
require File.dirname(__FILE__) + '/../../../test_helper'
require File.dirname(__FILE__) + '/../../../Methods/ProcessRecords'
require File.dirname(__FILE__) + '/../../../Methods/RuleCreation'
class RuleTemplateWithRule_test < Test::Unit::TestCase
def setup
@ie = getIEinstance
set_environment(@ie)
@ie=login(@ie, "radmin", "radmin747") # Calls the Login Method which
intoduces the wrapper that is
end
def teardown
closeIE(@ie)
end
def test_RuleTemplateWithRule
@ie.link(:text,'Update the Information).click
#Here the Refresh is happening
assert(@ie.contains_text('Another Rule is added'))
# The TestCase starts failing from here as it is not able to find the
next link as the object ie=ie.frame("ifr_content") is lost
@ie.link(:text, 'View Templates').click
assert_equal("enable", (@ie.image(:name,
'show_CumulativeUsageForIMSI').id))
assert_equal("disable", (@ie.image(:name,
'editCumulativeUsageForIMSI').id))
assert_equal("disable", (@ie.image(:name,
'deleteCumulativeUsageForIMSI').id))
end
end
The Login method used earlier in the testcase is writeen below
def login(ie,username,password)
ie.text_field(:name, "ranger_user[name]").set(username)
ie.text_field(:name, "ranger_user[password]").set(password)
ie.button(:name, "commit").click
sleep 2
return ie.frame("ifr_content")#returns the iframe object
end
I am also using @ie.refresh in some testcases.So I think the method also
needs to be modified .
Thanks and Regards
Ajitesh
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general