Not able to click on pop-up window in watir

Hi,

I have to create an script where i have to open an page in IE7.

Once page is opened, i have to search something and then have to press
the “Delete” button.

As soon as i press the “Delete” button, an Windows Internet explorer
window [small window] pop up with options “Ok” and “Cancel”.

But using watir code im not able to click this “Ok” button.

I think the reason is this pop window have some other ID which watir
does not knows.

Can anybody help me out how can i click this “Ok” button in pop-up
windows.

I can’t use WET or autoit as it is not allowed to add any addons. Still
can i do that?

  1. Popups are the bane of watir. If you can’t use wet or autoit
    (which I think is installed by default in watir actually), you almost
    can’t do it at all.

  2. There is a mailing list specifically for watir, and the author
    himself sometimes responds to questions, so you really should search
    the list first for an answer, then post if and only if neccessary.

Check your installation and see if, in fact, it did install autoit
when you installed watir.

You see, the popup (assuming it’s javascript, and not a fully fledged
legitimate html window) doesn’t show up as an ie window in any sense.
It’s a standard windows object, and isn’t covered under the IE ole
object. The only way to send click events to it, is to use some
library that reflects into it or some such nonsense.

Hope that helps.
–Kyle

Thanks Kyle,

I have tried using WET, but is it mandatory to install .NET framework
before installing WET addon for watir?

Can you please share the mailing list of watir or where can i find that
so that i can go ahead with this problem.

Thanks again

Kyle S. wrote:

  1. Popups are the bane of watir. If you can’t use wet or autoit
    (which I think is installed by default in watir actually), you almost
    can’t do it at all.

  2. There is a mailing list specifically for watir, and the author
    himself sometimes responds to questions, so you really should search
    the list first for an answer, then post if and only if neccessary.

Check your installation and see if, in fact, it did install autoit
when you installed watir.

You see, the popup (assuming it’s javascript, and not a fully fledged
legitimate html window) doesn’t show up as an ie window in any sense.
It’s a standard windows object, and isn’t covered under the IE ole
object. The only way to send click events to it, is to use some
library that reflects into it or some such nonsense.

Hope that helps.
–Kyle