Instead of asking “Why use Ruby?” let’s ask “Why use IE?” (Not to bash
Microsoft (not to bash those who bash Microsoft.))
The answer: I’m automating acceptance testing of a web application.
I’m just depressed that Netscape has no similar COM interface for
automating/remote controlling it.
Speaking of which, has anyone wrote any helper/utility classes
around Win32API for easy remote-controlling/automation? Otherwise,
I’m going to start writing them.
Also, interesting thing I just noted:
irb(main):001:0> require 'win32api’
LoadError: 127: The specified procedure could not be found. - Init_win32api
from (irb):1:in `require’
irb(main):002:0> require 'Win32API’
I wouldn’t have expected it to be case-sensitive, but it makes sense
why it was.
Is it because you are manually examining each page in addition to
No, I’m only automating testing (matter of fact, I’m leaving
visible = false for speed). However, since this is acceptance
gets executed and so on – we need to know that the page will
render correctly in versions of IE (5.0, 5.5, and now 6.0).
Yes, we can automate other testing by simply doing a HTTP GET of
a page and parsing the HTML document into a DOM tree and writing
assertions against the tree – this testing would be
browser-independent, probably more suitable for unit testing.
However, the acceptance testing is also important (perhaps even
more important, in my business customer’s eyes) and must be
done by driving the actual browser.
Would ActiveScriptRuby be of any help here? You can run Ruby within IE
Not sure. I haven’t played with ActiveScriptRuby. I’ll try to look
Also: Doesn’t every COM object have some kind of reflection API? (Not
sure – I’m not a COMmie.)
Yes. However, the information returned is only a list of methods,
not full documentation.
On 2002.07.17, Hal E. Fulton email@example.com wrote:
Dossy Shiobara mail: firstname.lastname@example.org
Panoptic Computer Network web: http://www.panoptic.com/
“He realized the fastest way to change is to laugh at your own
folly – then you can let go and quickly move on.” (p. 70)