I am using win32ole to control the Internet Explorer and I want to port
my tool to work with Safari.
I know that there is an extension for the watir project, which uses
AppleScript to drive safari, but this is not very elegant.
Does anyone know an interface (like win32ole) to control the safari
browser.
Is it WebKit? Maybe with RubyCocoa?
Is it WebKit? Maybe with RubyCocoa?
I’d check what AppleScript options are available for Safari. If there
are
enough hooks there, RubyCocoa will allow you to interface between Ruby
and
OSAScript (sort of). If not, you might be able to create a custom
WebKit
project in RubyCocoa, that automated the portions you want automated.
I know that there is an extension for the watir project, which uses
AppleScript to drive safari, BUT THIS IS NOT VERY ELEGANT.
SafariWatir (trunk) no longer uses Ruby/AppleScript to drive Safari.
It now uses Hamish Sanderson’s excellent rb-appscript Ruby/Apple-event
bridge. I’m not sure if you would consider this more elegant or not,
but it’s certainly a lot faster.