If this is a modal popup, then you can't attach to it.
If you click on the main window, but the popup window stays on top, then it
is modal.
If it's small, you can try handling it with AutoIt.
Sorry folks.
Bret
At 09:08 PM 8/30/2005, [EMAIL PROTECTED] wrote:
I'm just curious. Is the second window already there upon running the
program? if not maybe you could try putting wait(5) before the attach just
to be sure.
what's the exact error message?
and what's the exact title of the page when you view the source?
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mike Harris
Sent: Tuesday, August 30, 2005 7:19 PM
To: [email protected]
Subject: RE: [Wtr-general] Connecting to a second window
Thanks.I tried that and still had the same problem. I have just noticed
that 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]
[mailto:[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]
[mailto:[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]
[mailto:[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 message
do you get?
Zeljko
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[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
_____________________
Bret Pettichord
www.pettichord.com
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general