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 01:23 am (UTC)
fallenpegasus: amazon (Default)
From: [personal profile] fallenpegasus
You will have to show me more...

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

March 2026

S M T W T F S
1234567
8910111213 14
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 26th, 2026 02:59 am
Powered by Dreamwidth Studios