Handle Dialogbox

  • Thread starter Ambravaneswaran Subramanian
  • Start date
A

Ambravaneswaran Subramanian

Hi
I am new to ruby. I am using Ruby186-27_rc2 and watir watir-1.5.3.gem.
In that i am using winclicker to handle the Dialog box. The code works
fine when i run the particulat function alone. But when i run the entire
script it is failing.
Can anyone help on this issue.
Plz find the code below:
============================================
def OrderInsuraceScore
if ie1.frame:)name,'MainScreen').button:)id,'cmdOrder').exists? then
ie1.frame:)name,'MainScreen').button:)id,'cmdOrder').fire_event('onclick')
ClearDialogBox()
end
ie1.frame:)name,'MainScreen').table:)index,6)[2].fire_event('onclick')
ie1.frame:)name,'MainScreen').button:)id,'cmdSelect').fire_event('onclick')
ie1.frame:)name,'MainScreen').button:)id,'cmdAccept').fire_event('onclick')
end
============================================
def ClearDialogBox
t=Thread.new(){
c=WinClicker.new
sleep(9)
han = c.getWindowHandle("Microsoft Internet Explorer")
c.clickWindowsButton_hwnd(han ,"OK")
sleep(3)
}
t.join
end
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top