[Wtr-development] [JIRA] Commented: (WTR-129) Automatically wrap watir commands in a test case

Charley Baker (JIRA) watirjira at gmail.com
Sat Oct 2 16:47:30 EDT 2010

    [ http://jira.openqa.org/browse/WTR-129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19875#action_19875 ] 

Charley Baker commented on WTR-129:

This seems like an issue that's already handled by "frameworks" - Taza, Watircraft. I'd recommend closing. 

> Automatically wrap watir commands in a test case
> ------------------------------------------------
>                 Key: WTR-129
>                 URL: http://jira.openqa.org/browse/WTR-129
>             Project: Watir
>          Issue Type: New Feature
>            Reporter: Bret Pettichord
>            Priority: Major
>             Fix For: Future
> Simple test case
>   class MyTest < Watir::TestCase
>     def my_test
>       goto('http://www.google.com')
>       text_field(:name, 'q').set 'ruby'
>       button(:name, 'btnG').click
>       assert(text.include? 'pickaxe')
>     end
>   end
> Putting it all together
> test1.rb:
>       goto('http://www.google.com')
>       text_field(:name, 'q').set 'ruby'
>       button(:name, 'btnG').click
>       assert(text.include? 'pickaxe')
> test2.rb:
>       goto('http://www.google.com')
>       text_field(:name, 'q').set 'watir'
>       button(:name, 'btnG').click
>       assert(text.include? 'Holy Grail')
> From the command line:
>   > watir -t test*.rb
> This would automatically run the tests, creating a testcase wrapper for each test and then executing the combined suite.
> Reusing browsers between tests
> The "automatic" test suites will reuse a browser between tests, blanking the window, and recreate it if necessary. This is really the best way to use Watir. 
> * Possibly provide option to close and reopen between tests, but this is hard to make reliable!

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.openqa.org/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the Wtr-development mailing list