Watir: Clicking on a Window pop-up

A

Anukul Singhal

Hi,

I am working on an app which requires me to fill in the login
credentials and then click on the Windows pop-up. The Window pop-up has
windowCaption = "Microsoft Internet Explorer", buttonCaption = "OK"

require 'watir'
require 'watir/winClicker'

ie = Watir::IE.new
ie.goto("www.abc.com")
ie.text_field:)name, "USER").set "michael"
ie.text_field:)name, "PASSWORD").set "schumi"
ie.image:)src, "http://submit.gif").click
wc = WinClicker.new
wc.clickWindowsButton("Microsoft Internet Explorer", "OK", 30)

But it does not click on the pop-up. I even tried the method
clickJavaScriptDialog(button = "OK", parenthWnd = -1), but to no luck.
Even tried to change the window caption from "Microsoft Internet
Explorer" to "Internet Explorer", but still no luck.

Ultimately, to stop the execution, I click on the pop-up manually and
then it gives the error as
"c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/watir/winClicker.rb:232:
[BUG] Segementation Fault

This application has requested runtime to terminate it in an unusual
way. Please contact the application's support team for more
information."

Can anyone help in getting the solution for clicking the Windows Pop-up
with windowCaption as "Microsoft Internet Explorer" and Button caption
as "OK"?

Thanks,
Anukul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,520
Members
44,996
Latest member
rainocode

Latest Threads

Top