elfs: (Default)
[personal profile] elfs
FireWatir 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:
 $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.

Date: 2007-12-07 03:15 am (UTC)
From: [identity profile] elfs.livejournal.com
I'd certainly be willing to. It's an interesting toy. It opens up a telnet session to a server running within mozilla that allows you to operate a new javascript namespace, sending commands to the browser's event manager and analyzing the DOM afterwards. It's still very rough, but even that is enough to make it just mindbogglingly useful to me.

Profile

elfs: (Default)
Elf Sternberg

December 2025

S M T W T F S
 12345 6
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 28th, 2025 10:38 am
Powered by Dreamwidth Studios