If the code below is an actual snippet from your code then could the *order* the tests be the problem?
Please remember that the _default_ order of execution is ascending alpha, so the script would likely try to run the tests in the following order regardless of how they are arranged in the script : 1. test_addAccounts 2. test_login If the script hasn't logged in *before* you try to add the account, then you will always get an error. There are different ways of working around this issue. You could try changing the test method names or insert a command to override the order of test execution. Check the message archives for details - I didn't find anything in the FAQ right now for it. Let us know if that helps. Cheers. Paul C. On 25/06/07, Tiffany Fodor <[EMAIL PROTECTED]> wrote:
Hi! I'm creating a test harness that will first collect all of the data necessary to run the test cases then then execute the test cases. Here's the code that is calling the test cases: class TestScript < Test::Unit::TestCase def test_login login($producerName, $producerPass) end def test_addAccounts addAccounts($testAccounts) end end The login test works just fine, but the addAccounts test returns the following: Watir::Exception::UnknownObjectException: Unable to locate object, using text and Find Account This happens no matter what link or field I try to touch. The same commands work in the login test. I've tried using the attach method to specify what window to use, but that hasn't helped either.
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general