In your test, I dont see you click the link - you seem to also display 'goto
link failed' before going to it.
Maybe try this
begin
statusMessage="Click Link"
aboutlink=$ie.link(:text,"About").click
statusMessage="attaching to new window"
$ieAbout = IE.attach(:title, /About KALIDO MDM/)
assert($ieAbout.title=="About KALIDO MDM","Failed to invoke
About")
rescue
errorstring ="Failed while " + statusMessage
failTest(3,errorstring)
end
----- Original Message -----
From: Mike Harris <[EMAIL PROTECTED]>
Date: Tuesday, August 30, 2005 5:18 am
Subject: RE: [Wtr-general] Connecting to a second window
> Thanks.I tried that and still had the same problem. I have just
> noticedthat when I hover over the link with the mouse the path to
> the page for
> the second window is displayed in the status bar, but this does not
> include the name of the file. I am wondering if this is the
> problem.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [EMAIL PROTECTED] On Behalf Of Zeljko Filipin
> Sent: 30 August 2005 10:57
> To: [email protected]
> Subject: RE: [Wtr-general] Connecting to a second window
>
> Try this
>
> $ieAbout = Watir::IE.attach(:title, /About KALIDO MDM/)
>
> instead of
>
> $ieAbout = IE.attach(:title, /About KALIDO MDM/)
>
> Zeljko
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [EMAIL PROTECTED] On Behalf Of Mike Harris
> Sent: Tuesday, August 30, 2005 11:53 AM
> To: [email protected]
> Subject: RE: [Wtr-general] Connecting to a second window
>
> The last line put to the command console is attach failed. So I assume
> that it is the attach that has failed
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [EMAIL PROTECTED] On Behalf Of Zeljko Filipin
> Sent: 30 August 2005 10:44
> To: [email protected]
> Subject: RE: [Wtr-general] Connecting to a second window
>
> In which line does your script fail (goto or attach)? What error
> messagedo you get?
>
> Zeljko
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [EMAIL PROTECTED] On Behalf Of Mike Harris
> Sent: Tuesday, August 30, 2005 11:39 AM
> To: [email protected]
> Subject: [Wtr-general] Connecting to a second window
>
> I have just started to use Watir and am trying to connect to a new
> window using this code, but I fail to goto the link. Can you
> please give
> me some advice about why this may be failing. Thanks def
> test_03_ViewAbout
> puts "Test 3...View About"
> goToSignOnPage()
> login()
> begin
> statusMessage="Invoking About"
> aboutlink=$ie.getLink(:text,"About")
> statusMessage="goto link failed"
> puts("goto link failed")
> $ie.goto(aboutlink.href)
> puts("attach failed")
> statusMessage="attach failed"
> $ieAbout = IE.attach(:title, /About KALIDO MDM/)
> statusMessage="assert failed"
> assert($ieAbout.title=="About KALIDO
> MDM","Failed to invoke About")
> statusMessage="close failed"
> $ieAbout.close
> rescue
> errorstring ="Failed while " + statusMessage
> failTest(3,errorstring)
> end
> end
>
> Mike Harris
>
> _______________________________________________
> 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
>
>
>
> _______________________________________________
> 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
>
>
>
> _______________________________________________
> 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