WATIR is my new toy
Dec. 6th, 2007 03:44 pmFireWatir is a utility that runs on your client platform, invokes your browser and operates it via remote control. Using a very simple domain language describing the DOM tree, one can drive a web application. It's unbelievably trivial to use:
It totally makes my life easy.
$page.text_field(:id, 'field_username').set("user")
$page.text_field(:id, 'field_password').set("badpassword")
$page.button(:id, 'button_submit').click
assert(($page.title =~ /Login/) != nil,
"You went somewhere other than the Login page-- that's bad.")
$page.text_field(:id, 'field_username').set("user")
$page.text_field(:id, 'field_password').set("goodpassword")
$page.button(:id, 'button_submit').click
assert(($page.title =~ /Your Page/) != nil,
"You went somewhere other than the Your Page page-- that's bad.")
Holy frack. How the hell did I ever live before? A scripted driver just to take me to the page where the interaction goes sour takes so much of the boring routine crap of my daily life and automates it. I just sit back and watch the machine do the work.It totally makes my life easy.
no subject
Date: 2007-12-07 01:23 am (UTC)no subject
Date: 2007-12-07 03:15 am (UTC)