Forum: Ruby Automating Access

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Warren Dowling (Guest)
on 2006-06-07 06:30
(Received via mailing list)
Hi,

I'm currently working with the WIN32OLE object in an attempt to create a
test framework for the automation testing (mostly regression) of an
access
database that we have written. I am having great difficulty in
identifying
how to get hold of the event sink for either access or the forms that
are
being displayed. Would anyone know if there is one and if so what it's
called/how to get it.

I've tried a variety of things but the .._EVENT.new(@TMWin) fails, with
an
'interface not found' or 'No Such Interface supported' error message

The code I've got so far looks like this:

    @TMWin = WIN32OLE.new("ACCESS.Application")
    @TMWin.visible = true
    @TMWin.OpenCurrentDatabase
"c:\\TM-Testing\\2000-TMInterface5.1.3.mdb"
    ev=WIN32OLE_EVENT.new(@TMWin)
    ev.on_event {|*args| puts'here'}
#    ev.on_event("quit") {thow:done}

    catch(:done) do
      loop do
        WIN32OLE_EVENT.message_loop
      end#loop
    end#catch
  end#def


Thanks for your help

Warren


   _____

Warren Dowling

Test Engineer

T:   +61 (07) 38396346
M:   +61 (0)405 227 661
F:   +61 (07) 5522 5232	 HYPERLINK
"mailto:removed_email_address@domain.invalid"removed_email_address@domain.invalid

Level 6, 131 Leichhardt St
Spring Hill
Qld 4000

   _____


HYPERLINK "http://www.kjross.com.au/"K.J.Ross & Associates

   _____


This document (including attachments) is only intended for its
addressee/s
and may contain privileged or confidential information. Unauthorised use
or
distribution of this document or any part of its contents, is
prohibited. If
you have received this email in error please notify the sender and
delete
the email immediately.
This topic is locked and can not be replied to.