You may consider using  a thread.  Basically in the sample the thread
is started.  The button is clicked, the popup occurs... the thread def
is completed and killed...

See thread:
http://groups.google.com/group/watir-general/browse_thread/thread/2d8d850ed26c5979/d239c4976752329f?lnk=gst&q=kpetry#d239c4976752329f
for context.

Example:
def threaded_check_for_popups(sTitleMatch)
  puts 'threaded_check_for_popups'
  autoit=WIN32OLE.new('AutoITX3.Control')
  iReturn=0
  iCnt=0
  autoit.AutoItSetOption('MouseCoordMode',2)  # Relative to client
window
  loop do
    ret = autoit.WinWait(sTitleMatch,'',1)
    if ret == 1 then
      autoit.WinActivate(sTitleMatch)
      autoit.MouseMove(140,70)  # Move over the control
      # {enter} {Y} {N} {cancel}
      autoit.Send('{enter}')
    end
    sleep 1
    autoit.MouseMove(26,26)
    sleep 3
  end
  puts ' - Return: '+iReturn.to_s
  return iReturn
end


#### MAIN #####
  myPopup = Thread.new{threaded_check_for_popups(sTitleMatch)}
  at_exit {Thread.kill(myPopup)}
  ie.button(:name,'the_button_name').click







On Jun 16, 4:59 am, NumOi3 <numobjaka...@gmail.com> wrote:
> thankyou but it still not work
>
> i use watir-webdriver to run on google chrome and i didn't found  lib -> 
> enabled_popup.rb for watir-webdriver
>
> and chromewatir too
>
> and i can not use click_no_wait method too
>
> so i think chromewatir not support popup , am i right?
>
> On Jun 16, 4:13 am, orde <ohil...@gmail.com> wrote:
>
>
>
> > I generally test using IE, but this is the link to the FAQ:
>
> >http://wiki.openqa.org/display/WTR/Pop+Ups
>
> > Hope it helps.
>
> > On Jun 14, 9:20 pm, NumOi3 <numobjaka...@gmail.com> wrote:
>
> > > Hi All,
> > > I am working with web-driver for test  google chrome  browser.
> > > and there's  pop up is generated after clicking on a button.
> > > i need to click "OK" button and get text form pop up.
> > > How can i access these popup.
>
> > > Please help ...- Hide quoted text -
>
> - Show quoted text -

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com

Reply via email to