# Not able to click on pop-up window in watir

**URL:** <https://www.ruby-forum.com/t/not-able-to-click-on-pop-up-window-in-watir/126479>\
**Category:** Ruby\
**Created:** [January 18, 2008, 4:41pm UTC](https://www.ruby-forum.com/t/not-able-to-click-on-pop-up-window-in-watir/126479 "2008-01-18T16:41:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhavesh1\_sharma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dfb087/32.png) [@bhavesh1\_sharma](https://www.ruby-forum.com/u/bhavesh1_sharma)\
**Post date:** [January 18, 2008, 4:41pm UTC](https://www.ruby-forum.com/t/not-able-to-click-on-pop-up-window-in-watir/126479/1 "2008-01-18T16:41:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![bhavesh1\_sharma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dfb087/32.png) [@bhavesh1\_sharma](https://www.ruby-forum.com/u/bhavesh1_sharma)\
**Post date:** [January 18, 2008, 8:40pm UTC](https://www.ruby-forum.com/t/not-able-to-click-on-pop-up-window-in-watir/126479/2 "2008-01-18T20:40:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bhavesh1\_sharma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dfb087/32.png) [@bhavesh1\_sharma](https://www.ruby-forum.com/u/bhavesh1_sharma)\
**Post date:** [January 19, 2008, 7:09am UTC](https://www.ruby-forum.com/t/not-able-to-click-on-pop-up-window-in-watir/126479/3 "2008-01-19T07:09:46Z")

</div>

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
