Thanks Angrez,  I wonder how to print this popup text since if the
javascript popup appears, firewatir seems waiting for your action. So
although I add
puts "===="+ff.get_popup_text()
behind clientSettings.button(:name,"applyButt").click,  everything
hangs unless I manual click, after clicking, console prints "===="
only, which means get_popup_text return NULL.  Is that normal?

BTW, I let startClicker prints the content to jssh as:
      puts "jssh command sent for js pop up is : #{jssh_command}"
      $jssh_socket.send("#{jssh_command}\n", 0)

And got such msg:
jssh command sent for js pop up is : var win =
browser.contentWindow;var popuptext =
'';                                 var old_alert =
win.alert;                                 var old_confirm =
win.confirm;                                 win.alert = function
(param) {if(param == "The configuration on this page will reset all
connections, are you sure to submit?")
{                                                popuptext =
param;                                                 return
true;                                              }
else {                                                popuptext =
param;                                                win.alert =
old_alert;                                                win.alert
(param);                                              }};
win.confirm = function(param) {if(param == "The configuration on this
page will reset all connections, are you sure to submit?")
{                                                popuptext =
param;                                                 return
true;                                              }
else {                                                win.confirm =
old_confirm;                                                win.confirm
(param);                                              }};


On 4月21日, 下午2时40分, Angrez Singh <[email protected]> wrote:
> can you try using this method get_popup_text() after clicking the button to
> check what is the pop up text?
>
> - Angrez
>
> 2009/4/20 ajee <[email protected]>
>
>
>
> > startclicker goes well while I puts statements there, it has completed
> > its job, sending msg to jssh sucessfully :(
>
> > Can you share some information on how the Jssh works or point me to
> > some link so that I can continue to trace what happen in Jssh side?
>
> > Thanks
>
> > On 4月9日, 下午3时28分, Angrez Singh <[email protected]> wrote:
> > > I tested it on windows with FF3 not sure about ubuntu. You can use some
> > puts
> > > statements in firewatir class i mean you can go through the startclicker
> > > method and see where it fails?
>
> > > - Angrez
>
> > > 2009/4/9 ajee <[email protected]>
>
> > > > Hey Angrez,
>
> > > > I tried, unfortunately, still failed. I wonder if we are using
> > > > different system, as titled, I am in Ubuntu, with FF3, jssh0.9. Is any
> > > > suggestion for me? or can you tell the internals between firewatir and
> > > > jssh and how to debug, since I can build jssh plugin from source code,
> > > > so I can monitor in which step it is failed.
>
> > > > Thanks
>
> > > > On 4月9日, 下午2时08分, Angrez Singh <[email protected]> wrote:
> > > > > Hi,
>
> > > > > Thanks for the code. I checked it here with the same configuration
> > i.e.
> > > > same
> > > > > text it works. Can you try just clicking the "ok" button like this:
>
> > > > > ff.startClicker("ok")
>
> > > > > - Angrez
>
> > > > > ff.startClicker("ok",1,'',"The configuration on this page will
> > resetall
> > > > the
>
> > > > > > active connections, are you sure to submit?")
>
> > > > > > Here I have another problem, it seems that ff.wait can't always
> > work,
> > > > > > so somethime script will complain no finding of html element and
> > quit.
>
> > > > > > Thanks
>
> > > > > > On 3月23日, 下午2时31分, Angrez Singh <[email protected]> wrote:
> > > > > > > Can you make sure that pop up text is correct? Also can you post
> > your
> > > > > > > ruby/html code here so that we can help you better.
>
> > > > > > > - Angrez
>
> > > > > > > On Mon, Mar 23, 2009 at 7:37 AM, ajee <[email protected]>
> > wrote:
>
> > > > > > > > Hi all, I have searched the Internet for a long time on this
> > topic,
> > > > > > > > but there is no resolve I got. I know that somebody raises
> > advice
> > > > of
> > > > > > > > using startClicker, but when I use it, no use:
>
> > > > > > > > ff.startClicker("ok",1,'',"The configuration on this page will
> > > > reset
> > > > > > > > all connections, are you sure to submit?")
>
> > > > > > > > In order to know why, I managed to compile jssh.xpi, to get
> > into
> > > > > > > > firefox 3.0, adding some debug msg. By this, I saw jssh gets
> > the
> > > > > > > > correct msg of startClicker from firewatir,  proxied_shell-
> > > > > > > > >ExecuteBuffer return NS_OK. So I don't  know how to go on,
> > with
> > > > this
> > > > > > > > popup javascript confirm window, Firefox can't proceed.-
> > 隐藏被引用文字 -
>
> > > - 显示引用的文字 -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to