[wtr-general] Re: IE7 Popup handling
Hi Abhishek, Please try this below piece of code. Need to install Autoit software. def check_for_popups autoit = WIN32OLE.new('AutoItX3.Control') autoit.Opt(WinTitleMatchMode, 3) puts Launched the global pop-up handler loop do # Look for window with given title. Give up after 1 second. ret = autoit.WinWait('Choose Digital Certificate', '', 1) # If window found, send appropriate keystroke (e.g. {enter}, {Y}, {N}). if ret==1 then autoit.WinActivate('Choose Digital Certificate') sleep(1) autoit.Send('{enter}') end Regards, Kiran Y On Mon, Mar 2, 2009 at 3:33 PM, Abhishek kulkarni.abhishe...@gmail.comwrote: Is there any simple way to handle IE7 popup Choose Digital Certificate ? I need a generic popup handling library which can handle all kind of Javascript popups in IE7. Thanks in advanced - Abhishek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: IE7 Popup handling
Hi Kiran, Thanks for your quick response. I want to handle this Pop up using Watir only. Can I run this script in Ruby? Thanks Abhishek On Mon, Mar 2, 2009 at 3:51 PM, kiran yajamanyam kiranyajaman...@gmail.comwrote: Hi Abhishek, Please try this below piece of code. Need to install Autoit software. def check_for_popups autoit = WIN32OLE.new('AutoItX3.Control') autoit.Opt(WinTitleMatchMode, 3) puts Launched the global pop-up handler loop do # Look for window with given title. Give up after 1 second. ret = autoit.WinWait('Choose Digital Certificate', '', 1) # If window found, send appropriate keystroke (e.g. {enter}, {Y}, {N}). if ret==1 then autoit.WinActivate('Choose Digital Certificate') sleep(1) autoit.Send('{enter}') end Regards, Kiran Y On Mon, Mar 2, 2009 at 3:33 PM, Abhishek kulkarni.abhishe...@gmail.comwrote: Is there any simple way to handle IE7 popup Choose Digital Certificate ? I need a generic popup handling library which can handle all kind of Javascript popups in IE7. Thanks in advanced - Abhishek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: IE7 Popup handling
h. Something is wrong I did not receive any error but unable to click OK button. I am doing it in the following way ... My.rb - require 'win32/process' require 'watir' ie=Watir::IE.new link = Specified-URL ie.goto(link) @pid = Process.create( :app_name = 'ruby clicker.rb', :creation_flags = Process::DETACHED_PROCESS ).process_id at_exit{ Process.kill(9,@pid) } AND clicker.rb - require 'win32ole' autoit = WIN32OLE.new('AutoItX3.Control') autoit.Opt(WinTitleMatchMode, 3) puts Launched the global pop-up handler loop do # Look for window with given title. Give up after 1 second. ret = autoit.WinWait('Choose a digital certificate', '', 1) # If window found, send appropriate keystroke (e.g. {enter}, {Y}, {N}). if ret==1 then autoit.WinActivate('Choose a digital certificate') sleep(1) autoit.Send('{enter}') What could be the wrong? Thanks Abhishek On Mon, Mar 2, 2009 at 4:48 PM, kiran yajamanyam kiranyajaman...@gmail.comwrote: Yes u can run this script in Ruby. Let me know if you face any issue while executing this code. Regards, Krian Y On Mon, Mar 2, 2009 at 4:40 PM, Abhishek Kulkarni kulkarni.abhishe...@gmail.com wrote: Hi Kiran, Thanks for your quick response. I want to handle this Pop up using Watir only. Can I run this script in Ruby? Thanks Abhishek On Mon, Mar 2, 2009 at 3:51 PM, kiran yajamanyam kiranyajaman...@gmail.com wrote: Hi Abhishek, Please try this below piece of code. Need to install Autoit software. def check_for_popups autoit = WIN32OLE.new('AutoItX3.Control') autoit.Opt(WinTitleMatchMode, 3) puts Launched the global pop-up handler loop do # Look for window with given title. Give up after 1 second. ret = autoit.WinWait('Choose Digital Certificate', '', 1) # If window found, send appropriate keystroke (e.g. {enter}, {Y}, {N}). if ret==1 then autoit.WinActivate('Choose Digital Certificate') sleep(1) autoit.Send('{enter}') end Regards, Kiran Y On Mon, Mar 2, 2009 at 3:33 PM, Abhishek kulkarni.abhishe...@gmail.comwrote: Is there any simple way to handle IE7 popup Choose Digital Certificate ? I need a generic popup handling library which can handle all kind of Javascript popups in IE7. Thanks in advanced - Abhishek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---