hi,
Tell me is 'continue' is responsible for popup...
if yes..then how it will take text..u didnot define any function for popup
hadling...include this function too..

def start_jsalert_clicker
       Thread.new{ system("ruby \"c:\\PSC\\jscriptExtraAlert.rb\"") }###
please take care of this path...this path belongs to jscriptExtraAlert file
according to my machine..u specify this as yours...
 end
@IE0.link(:text, "Sign In").click
start_jsalert_clicker
 @IE0.image(:alt, "continue").click
 captureText
i mean call this function 'start_jsalert_clicker' before that object who is
responsible for popup..

tell me if its helps u or not....

Regards and Thanks
Shalini Gupta


and use this as..

On 5/10/07, gary <[EMAIL PROTECTED]> wrote:

Hi still no luck I'm afraid, this is the closest I can get to what I want
but with odd behaviour.

For some reason the first alert does not appear to be recognised, but if I
select this manually and then select the continue button again then the
script kicks in again, extracts the text, puts the text out to the console,
and then closes the alert as per the script. I'm just struggling to
understand why it's not recognised the first time round. Any ideas? See
script below:

require 'watir'   # the controller
include Watir
require 'watir/WindowHelper'
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'dl/win32'
require 'watir/winClicker'

class TC_recorded < Test::Unit::TestCase

def captureText
  autoit = WIN32OLE.new('AutoItX3.Control')
  ret = autoit.WinWait "Windows Internet Explorer", ""
  text = autoit.WinGetText "Windows Internet Explorer", ""
  puts text.to_s
  autoit.Send "{enter}"
end


def test_1
  @IE0 = IE.new
  @IE0.set_fast_speed
  @IE0.goto("www.hmv.co.uk")
  @IE0.link(:text, "Sign In").click
  @IE0.image(:alt, "continue").click
  captureText

  @IE0.close
  end
end
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to