Re: [Wtr-general] How to handle pop dialouge boxes by clicking on OK button

2007-05-18 Thread Grzesiek
Hi,

For me it works this way (watir-1.5.1.1166)

require 'watir/contrib/enabled_popup'


ie.button(:value, /#{valid_text}/).click_no_wait#pressing 
button after which popup shows

hwnd = ie.enabled_popup(15)   # get a handle if one exists

if (hwnd)# yes there is a popup
w = WinClicker.new
w.makeWindowActive(hwnd)
w.clickWindowsButton_hwnd(hwnd, "Yes") # click the "Yes" button
end
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] How to handle pop dialouge boxes by clicking on OK button

2007-05-09 Thread SHALINI GUPTA

in second solution have u changed the path:-
Thread.new{ system("ruby \"c:\\PSC\\jscriptExtraAlert.rb\"") }

i mean to say jscriptExtraAlert...path..
search this file and specy path there...



On 5/10/07, vamsi <[EMAIL PROTECTED]> wrote:


Hi Shalini,

Thank you very much for your response.

How ever i couldn't able to resolve my issue with these solutions.

1 soultion : giving error message as 'NoMethodError: undefined method
`dir' for nil:NilClass'
 and not moving to the next line '$ie.button(:name,"button
responsible for popup")'
2. Solution: Problem is same.. Not handling the popup
updated  windowhelper.rb file too.

Thanks in advance.


Regards
Vamsi
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] How to handle pop dialouge boxes by clicking on OK button

2007-05-09 Thread vamsi
Hi Shalini,

Thank you very much for your response.

How ever i couldn't able to resolve my issue with these solutions.

1 soultion : giving error message as 'NoMethodError: undefined method `dir' for 
nil:NilClass' 
 and not moving to the next line '$ie.button(:name,"button 
responsible for popup")'
2. Solution: Problem is same.. Not handling the popup
 updated  windowhelper.rb file too.

Thanks in advance.


Regards
Vamsi
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] How to handle pop dialouge boxes by clicking on OK button

2007-05-08 Thread SHALINI GUPTA

hi,

U can use this code

def startClicker( button , waitTime = 3)
w = WinClicker.new
longName = $ie.dir.gsub("/" , "\\" )
shortName = w.getShortFileName(longName)

c = "start ruby #{shortName}\\watir\\clickJSDialog.rb #{button} #{waitTime}
"
puts "Starting #{c}"
w.winsystem(c)
w=nil
###end of function StartClicker
end

u have to call startClicker function before that object who is responsible
for popup
like as:-
startClicker("OK",3)
$ie.button(:name,"button responsible for popup")

u also can use this code too:-
def start_jsalert_clicker
   Thread.new{ system("ruby \"c:\\PSC\\jscriptExtraAlert.rb\"") }
 end
 u have to change ur windowhelper.rb file as...
def push_alert_button
   @autoit.WinWait "Window Internet Explorer", ""
   text = @autoit.WinGetText "Window Internet Explorer"
   file = File.open("c:\\test.txt", "w")
   file.puts text
   puts text.to_s
   file.close
   @autoit.Send "{ENTER}"
end

This code will also give u the text on the popup

tell me if this does not work
u have to use start_jsalert_clicker before that button which is responsible
for popup.

Regards
Shalini

On 5/9/07, vamsi <[EMAIL PROTECTED]> wrote:


My application having confirmation messages as "Pop up dialogue box". the
application will not move to next page until you click on 'OK' button.

the popup winodw will be like this..

Windows intrenet explorer
--

Some information

OK buttonCancel

---

My Script is not recognising my instruction to click this button.  Can any
one help me to solve this problem?

Thanks in Advance.

Regards
vamsi
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] How to handle pop dialouge boxes by clicking on OK button

2007-05-08 Thread vamsi
My application having confirmation messages as "Pop up dialogue box". the 
application will not move to next page until you click on 'OK' button.

the popup winodw will be like this..

Windows intrenet explorer
--

Some information

OK buttonCancel

---

My Script is not recognising my instruction to click this button.  Can any one 
help me to solve this problem?

Thanks in Advance.

Regards
vamsi
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general