Hi all,

After the latest discussions about DSLs and keyword driven frameworks i gave 
that topic some thoughts and came up with the following problem:

In both cases (DSL and excel sheet containing keywords and actions) you have to 
specify the page, objects on that page and the related actions in order to have 
your testcase design as flexible as it could be. 
You could encapsulate e.g. "LoginPage", "username_field", "password_field", 
"set_text" etc in some kind of an action method called "login" but you or your 
test designers would loose the flexibility to play arround with the objects on 
a page (ok - login is a very basic example. I'm not sure if it makes that much 
sense to play around with 2 input fields and a button ;))

By only specifing objects and actions related to those objects in your test 
description you have no easy way to set conditions. Im looking for some sort of 
eventhandling for making those tests more robust. Lets say your SUT demands 
that you change your password every 6 six weeks. In that case i would like to 
have something like this:

goto LoginPage do
        username.set user
        password.set pwd
        login.click
        on PleaseChangeYourPassword do
                old_password.set pwd
                new_password.set new_pwd
                ok.click
        end
end

Is it possible to implement such a kind of a eventhandling with ruby and watir 
or do you guys have a better idea for handling such a kind of problem? 

--Christian
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to