|
Red Squirrel Reflections
Dave Hoover explores the psychology of software development
|
|
Wed, 22 Nov 2006Hamish released the first rb-appscript gem, paving the way for the new and improved SafariWatir. Now with non-sluggish performance! Seriously, my regression test script runs ridiculously fast on my MacBook Pro compared to previous versions of SafariWatir.
This performance boost comes as no surprise. Up until now I was doing the
`osascript <<SCRIPT
tell application "Safari"
do JavaScript "#{script}" in document 1
end tell
SCRIPT`.chomp
This got me started, but it turns out that using an Apple Event bridge like rb-appscript is more natural, and so much faster...
app = AS.app("Safari")
document = app.documents[1]
app.do_JavaScript(script, :in => document)
In unrelated news, my fellow Obtivian Tyler Jennings has submitted his first Rails patch.
|