Thanks,
One more question, does this only work with buttons that trigger dialog
boxes?
I've ran dialog_test.rb to completion without any issues and also created my
tests that clear dialogs after clicking a button. However, in the
application I'm testing there's a link which triggers the dialog box.
I've finally found a way to successfully clear this using the older method
i.e.
controls = ie2.frame(:name, "Controls")
Thread.new { system("rubyw \"#{$mydir}\\jscriptExtraConfirmOk.rb\"")
}
controls.link(:index, 2).click()
I've tried to replace this with the newer method
i.e.
controls = ie2.frame(:name, "Controls")
controls.remote_eval "link(:index, 2).click()"
dialog.button('OK').click
but get an error
NoMethodError: undefined method `document' for nil:NilClass
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1237:in `title'
c:/ruby/lib/ruby/site_ruby/1.8/Watir/Dialog.rb:43:in `remote_eval'
LMDC_Invites.rb:292:in `test_LMDC_submit'
LMDC_Invites.rb:136:in `each'
LMDC_Invites.rb:136:in `test_LMDC_submit'
Are the any special rules for this scenario? Or for clearing security alerts
/ submitting network logons?
cheers
Iain
-----Original Message-----
From: Bret Pettichord [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 09, 2005 11:13 AM
To: [email protected]
Subject: RE: [Wtr-general] New, improved support for popup dialogs
You should be fine.
I've committed a fix to the installer to avoid this problem in the future.
The problem is due to the fact that the rdocs aren't in the tar ball.
Bret
At 12:14 PM 8/9/2005, Iain wrote:
>Thanks, hindsight is a wonderful thing ...
>
>I can get dialog_tests.rb to run without issues now although the
>installer gave an error message.
>
>Is this anything to be concerned about?
>
>
>Going to install to C:\Program Files\WATIR with startMenu=1 and
>desktop=0 Copying Files watir.rb ->
>c:\ruby\lib\ruby\site_ruby\1.8/watir.rb
>cp -r watir c:\ruby\lib\ruby\site_ruby\1.8 cp -r examples C:\Program
>Files\WATIR cp -r unitTests C:\Program Files\WATIR cp -r doc C:\Program
>Files\WATIR cp -r rdoc C:\Program Files\WATIR
>c:/ruby/lib/ruby/1.8/FileUtils.rb:525:in `stat': No such file or
>directory - rdoc (Errno::ENOENT)
> from c:/ruby/lib/ruby/1.8/FileUtils.rb:525:in `stat'
> from c:/ruby/lib/ruby/1.8/FileUtils.rb:501:in `_copy_content'
> from c:/ruby/lib/ruby/1.8/FileUtils.rb:462:in `copy_content'
> from c:/ruby/lib/ruby/1.8/FileUtils.rb:461:in `preserve'
> from c:/ruby/lib/ruby/1.8/FileUtils.rb:461:in `copy_content'
> from c:/ruby/lib/ruby/1.8/FileUtils.rb:424:in `copy_file'
> from c:/ruby/lib/ruby/1.8/FileUtils.rb:383:in `cp_r'
> from c:/ruby/lib/ruby/1.8/FileUtils.rb:376:in `fu_each_src_dest'
> from c:/ruby/lib/ruby/1.8/FileUtils.rb:845:in `fu_each_src_dest0'
> from c:/ruby/lib/ruby/1.8/FileUtils.rb:845:in `fu_each_src_dest'
> from c:/ruby/lib/ruby/1.8/FileUtils.rb:376:in `cp_r'
> from install.rb:120:in `install'
> from install.rb:202
> from install.rb:201:in `call'
> from
>c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.2.2-mswin32/lib/fox12/responder2.rb
:
>57:in `onHandleMsg'
> from install.rb:211:in `run'
> from install.rb:211
>
>-----Original Message-----
>From: Bret Pettichord [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, August 09, 2005 9:33 AM
>To: [email protected]
>Subject: RE: [Wtr-general] New, improved support for popup dialogs
>
>You need to run the install.rb script.
>
>At 11:26 AM 8/9/2005, Iain wrote:
> >I'm getting an error whenever I add require 'watir/dialog' to any
> >script
> >
> >c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
> >`require__': No such file to load -- watir/dialog (LoadError)
> > from
> >c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`require'
> > from V2_Setup.rb:8
> >
> >I'm guesing that it's due to the way I installed it. I've never
> >installed Watir from the development tarball before, I always use the
>installer.
> >
> >Can you please let me know where I should be extracting the files to?
> >
> >Thanks
> >
> >Iain
> >
> >
> >
> >
> >-----Original Message-----
> >From: Bret Pettichord [mailto:[EMAIL PROTECTED]
> >Sent: Monday, August 08, 2005 7:43 PM
> >To: [email protected]
> >Subject: [Wtr-general] New, improved support for popup dialogs
> >
> >I've committed the initial version of new code for supporting popup
>dialogs.
> >
> >Using this code:
> >- You don't have to use separate 'mini-scripts.'
> >- You don't have to spawn a process.
> >- You don't have to spawn a thread.
> >
> >This is all done for you behind the scenes.
> >
> >You use it like this:
> >
> > require 'watir/dialog'
> > $ie.remote_eval <<-END
> > button(:value, 'whatever').click
> > END
> > dialog.button('OK').click
> >
> >Note that remote_eval takes a string argument. This is the same:
> >
> > ie.remote_eval "button(:value, 'whatever').click"
> >
> >The code in the string is evaluated in the context of an equivalent
> >IE object in an independent process.
> >
> >See dialog_tests.rb for more examples.
> >
> >I am very interested in getting feedback on the names of the
> >interface for this functionality: "remote_eval", "dialog", etc
> >
> >Get the development tarball:
> >http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/watir.tar.gz?tarball=1
> >&c
> >vsroo
> >t=wtr
> >
> >This code currently supports simple dialogs. Next is to add support
> >for the authorization dialogs -- a frequently requested thing. I
> >really would like to have unit tests for this, which means i need a
> >quick server that does authorization. Anyone know how to roll one with
webrick?
> >
> >
> >_____________________
> > Bret Pettichord
> > www.pettichord.com
> >
> >
> >
> >_______________________________________________
> >Wtr-general mailing list
> >[email protected]
> >http://rubyforge.org/mailman/listinfo/wtr-general
>
>_____________________
> Bret Pettichord
> www.pettichord.com
>
>
>
>_______________________________________________
>Wtr-general mailing list
>[email protected]
>http://rubyforge.org/mailman/listinfo/wtr-general
_____________________
Bret Pettichord
www.pettichord.com
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general