You could also try to monkey patch RAutomation as described in this issue: https://github.com/jarmo/RAutomation/issues/28
Maybe it helps, i haven't tried. Jarmo Pertman ----- IT does really matter - http://itreallymatters.net On Tuesday, October 2, 2012 3:37:11 PM UTC+3, enroxorz wrote: > > Have you looked at this? > > http://watirwebdriver.com/javascript-dialogs/ > > The latter portion will work with 3.0.0 (3.1.0 and higher will need to use > the former). > > Also, if you are planning on using 3.1 or 3.2 in the future look at this > post for an odd caveat that I found with Javascript Dialog Boxes and > onclick events for buttons: > > https://groups.google.com/d/topic/watir-general/KeuVqLLmOig/discussion > > One last thing. Locking windows causes more headaches than its worth. Do > you need your windows session to be locked? If not than leave it open. If > it is a VM and you RDP into that VM, dont RDP. Use a VNC or something else > instead because once you leave your RDP session it locks. > > Hope this helps. > > On Monday, October 1, 2012 9:46:42 PM UTC-4, praveen kumar wrote: >> >> Watir 3.0.0 >> >> On Tuesday, October 2, 2012 1:27:55 AM UTC+5:30, enroxorz wrote: >>> >>> What version of Watir are you using? >>> >>> On Monday, October 1, 2012 2:26:35 AM UTC-4, praveen kumar wrote: >>>> >>>> Hi All, >>>> >>>> There is a javascript pop-up. I am handling as shown below. It is >>>> working fine only if that window is enabled. >>>> >>>> If the machine is locked or moving to the another window while >>>> execution. Its not working. Is there any way to focus that window after >>>> pop >>>> up is enabled. >>>> >>>> $ie.wait_until{$ie.javascript_dialog.button('OK').enabled?} >>>> $ie.javascript_dialog.button('OK').click >>>> >>>> Please let me know your thoughts. >>>> >>>> Thanks, >>>> Praveen >>>> >>> -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
