[wtr-general] Re: Extension for testing flash applications with Watir

2008-12-18 Thread Wilson Xu

Can you write the sample code to show me how do you verify the add
method in the following website.
http://www.terrence.com/flash/calculator.html

Thank you very much.
Wilson Xu


On Dec 19, 12:27 pm, sai  wrote:
> Doing validations is up to you. You can work with and get the result
> from the flash app using flash watir and then user assert for
> comparison if you use any xunit framework.
> If not you can use a simple if statement for comparison
>
> Please let me know if you need more info.
>
> Regards,
> Sai
>
> On Dec 19, 12:23 pm, Wilson Xu  wrote:
>
> > Is there any validation methods that verify actual and expect result?
> > For example, there is a flash calculator in the webpage, I want to
> > verify one add one is equal two, can flash-watir can support these
> > operations?
>
> > Wilson
>
> > On Dec 17, 7:10 pm, sai  wrote:
>
> > > Hi Guys,
>
> > > I have written an extension for Watir for testing flash applications.
> > > You
> > > can get more details athttp://code.google.com/p/flash-watir. As of
> > > now it
> > > supports only firefox. I am working on the IE version now.
> > > The documentation of usage as well its working is available in the
> > > wiki
> > > pages of the project. The source is available for download as gem as
> > > well as
> > > in SVN for checkout.
>
> > > Please let me know your thoughts and feedback.
>
> > > Also I will be writing about this in Watir wiki for people to refer.
>
> > > Thank you
>
> > > Regards,
> > > Sai
>
> > > P.S. I am also working on Silverlight extension for watir :)
--~--~-~--~~~---~--~~
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: Turning Javascript on and off

2008-12-18 Thread Wilson Xu

Also you can use MouseClick "button" [, x, y [, clicks [, speed ]]] in
the AutoITx to resolve your issue, but I think the Richard's method is
more better.

Wilson Xu

On Dec 16, 7:13 am, Paul Denize  wrote:
> Just to update here is a version of my final routine
>
> Hope it helps someone else
>
> Paul
>
> --
>
> def JavaScript(zone,on=nil,silent=nil)
>   # if on is nil it returns true iff javascript is enabled (not it
> could also be off or prompt, both false)
>   # if true it sets it to enabled
>   # if false it sets it to disabled
>   # It does not set it to prompt (but could - not sure why you would)
>   # silent - set it to anything and it does not output what it is
> doing
>
>   case (zone)
>     when 1:
>       zonename = "Local intranet zone"
>     when 2:
>       zonename = "Trusted sites zone"
>     when 3:
>       zonename = "Internet zone"
>     when 4:
>       zonename = "Restricted sites zone"
>     else
>       fail "Arguement error when calling function JavaScript - zone #
> {zone} must be 1,2,3, or 4"
>   end
>
>   if (!silent)
>     puts "Call JavaScript(#{on.inspect})"
>   end
>
>   keyname = 'Software\Microsoft\Windows\CurrentVersion\Internet
> Settings\Zones\\'+zone.to_s
>   key_r = Win32::Registry::HKEY_CURRENT_USER.open(keyname)
>   if (!key_r)
>     fail "Registry HKEY_CURRENT_USER #{keyname} not found"
>   end
>   valuename = '1400'
>   type,data = key_r.read(valuename)
>   if (!data)
>     fail "Registry HKEY_CURRENT_USER #{keyname} - value #{valuename}
> not found"
>   end
>
>   javascript_was_on = (data==0)
>
>   if (on==nil)
>     if (javascript_was_on)
>       if (!silent)
>         puts "IE Javascript is on in #{zonename}"
>       end
>     else
>       if (!silent)
>         puts "IE Javascript is off in #{zonename}"
>       end
>     end
>     return javascript_was_on
>   end
>
>   if (on)
>     if (!javascript_was_on)
>       key_w = Win32::Registry::HKEY_CURRENT_USER.open
> (keyname,Win32::Registry::KEY_WRITE)
>       key_w.write(valuename,Win32::Registry::REG_DWORD,0)
>       if (!silent)
>         puts "Turning IE Javascript on in #{zonename}"
>       end
>     else
>       if (!silent)
>         puts "IE Javascript was on in #{zonename}"
>       end
>     end
>   else
>     if (javascript_was_on)
>       key_w = Win32::Registry::HKEY_CURRENT_USER.open
> (keyname,Win32::Registry::KEY_WRITE)
>       key_w.write(valuename,Win32::Registry::REG_DWORD,3)
>       if (!silent)
>         puts "Turning IE Javascript off in #{zonename}"
>       end
>     else
>       if (!silent)
>         puts "IE Javascript was off in #{zonename}"
>       end
>     end
>   end
>
>   return javascript_was_on
> end
--~--~-~--~~~---~--~~
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: Extension for testing flash applications with Watir

2008-12-18 Thread sai

Doing validations is up to you. You can work with and get the result
from the flash app using flash watir and then user assert for
comparison if you use any xunit framework.
If not you can use a simple if statement for comparison

Please let me know if you need more info.

Regards,
Sai

On Dec 19, 12:23 pm, Wilson Xu  wrote:
> Is there any validation methods that verify actual and expect result?
> For example, there is a flash calculator in the webpage, I want to
> verify one add one is equal two, can flash-watir can support these
> operations?
>
> Wilson
>
> On Dec 17, 7:10 pm, sai  wrote:
>
> > Hi Guys,
>
> > I have written an extension for Watir for testing flash applications.
> > You
> > can get more details athttp://code.google.com/p/flash-watir. As of
> > now it
> > supports only firefox. I am working on the IE version now.
> > The documentation of usage as well its working is available in the
> > wiki
> > pages of the project. The source is available for download as gem as
> > well as
> > in SVN for checkout.
>
> > Please let me know your thoughts and feedback.
>
> > Also I will be writing about this in Watir wiki for people to refer.
>
> > Thank you
>
> > Regards,
> > Sai
>
> > P.S. I am also working on Silverlight extension for watir :)
--~--~-~--~~~---~--~~
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: Extension for testing flash applications with Watir

2008-12-18 Thread Wilson Xu

Is there any validation methods that verify actual and expect result?
For example, there is a flash calculator in the webpage, I want to
verify one add one is equal two, can flash-watir can support these
operations?

Wilson

On Dec 17, 7:10 pm, sai  wrote:
> Hi Guys,
>
> I have written an extension for Watir for testing flash applications.
> You
> can get more details athttp://code.google.com/p/flash-watir. As of
> now it
> supports only firefox. I am working on the IE version now.
> The documentation of usage as well its working is available in the
> wiki
> pages of the project. The source is available for download as gem as
> well as
> in SVN for checkout.
>
> Please let me know your thoughts and feedback.
>
> Also I will be writing about this in Watir wiki for people to refer.
>
> Thank you
>
> Regards,
> Sai
>
> P.S. I am also working on Silverlight extension for watir :)
--~--~-~--~~~---~--~~
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: How to handle file download popups in Firefox?

2008-12-18 Thread Wilson Xu

Another way, I think you can use MouseClick() API in AutoITx to select
the radio box.

Wilson Xu

On Dec 19, 1:35 am, Margam  wrote:
> Hey guys,
> Thanks for the input. I will certainly try, as soon as I finish with
> my current project. Thanks.
>
> Margam
>
> On Dec 18, 3:56 am, al3kc  wrote:
>
> > onhttp://www.autoitscript.com/forum/index.php?showtopic=81915&hl=firefo...
> > I have found next code:
>
> > ControlClick("Opening", "", "MozillaWindowClass1", "left", 1, 46, 158)
> > sleep(1000)
> > ControlClick("Opening", "", "MozillaWindowClass1", "left", 1, 241,
> > 237)
> > sleep(1000)
>
> > All elements in "MozillaWindowClass1" has constant coordinates so you
> > can click any element in this window by coordinates.
--~--~-~--~~~---~--~~
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: Is the FireWatir-Watir integration working for you?

2008-12-18 Thread Wilson Xu

I have tested my existed suite on Firefox, found the returned content
of firewatir method is difference from between firewatir and watir,
please refer to the http://code.google.com/p/firewatir/issues/detail?id=80.
This is the biggest issues.

Wilson Xu

On Dec 19, 6:17 am, "Lisa Crispin"  wrote:
> I just haven't had time to get it working. Actually I haven't even had time
> to get my whole suite of tests working again. They run individually, but
> fail in a suite - windows are not getting closed and the next test fails.
> The suite ran before fine although we had been having random failures we
> couldn't figure out. This is a big problem for us but we've been swamped. I
> am determined to figure it out this sprint and we added a story this sprint
> to be sure we have time.
>
> It is ultimately our goal to be able to use FireWatir since 100% of our team
> works on a Mac. A couple of us also have PCs.
>
> I am excited about the potential, though! I guess it's a movie I really,
> really want to see how it ends!
> -- Lisa
>
> On Thu, Dec 18, 2008 at 3:09 PM, Pete Dignan  wrote:
>
> > I'm curious, now that 1.6.2 has been out for a little while.  Is the
> > integration of FireWatir and Watir working for you?  Are you using it
> > to test on both IE and Firefox? Are there issues that are preventing
> > you from using it effectively? If 1.6.2 were a movie and you were a
> > movie critic, how many stars would you give it?
>
> > Pete
>
> --
> Lisa Crispin
> Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers
> and Agile Teams_ (Addison-Wesley 
> 2009)http://lisa.crispin.home.att.nethttp://lisacrispin.blogspot.com
--~--~-~--~~~---~--~~
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: button.Click_No_Wait only highlights the button, does not click

2008-12-18 Thread Michael Hwee


Ok, please let us know the outcome.



- Original Message 
From: HAHAHA 
To: Watir General 
Sent: Thursday, December 18, 2008 12:50:34 PM
Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, 
does not click


I have tried to set IE to default, but it not work. Now I am trying to
reinstall ruby and watir.

On Dec 18, 11:34 am, Michael Hwee  wrote:
> First, go to your internet options and reset all your settings to default.
>
> On vista with IE7, check off the Protected Mode.
>
> Michael
>
>
>
> - Original Message 
> From: HAHAHA 
> To: Watir General 
> Sent: Wednesday, December 17, 2008 12:49:43 PM
> Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, 
> does not click
>
> I tried, even change the security of IE to Low, but the click_no_wait
> still cannot click the button.
> Now I just want to know what's the problem. Is it my IE's problem or
> Ruby's problem?
>
> On Dec 17, 11:53 am, Michael Hwee  wrote:
> > Come and think of that, have you ever got successful dismissing any other 
> > popup?
>
> > If I were you, I would be checking the browser configuration settings.
>
> > Michael
>
> > - Original Message 
> > From: Fish 
> > To: Watir General 
> > Sent: Tuesday, December 16, 2008 5:21:33 PM
> > Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, 
> > does not click
>
> > I use the ruby186-26,but still can not handle the popup...Just only
> > block at the commandline.
> > Does someone kindly do me a favor to provide code which can handle the
> > modaldialog?I very appreciate it.
> > I have tried below, but it doestn't work.
> > @ie.button(:value, "New").click_no_wait #pop up a modaldialog, by the
> > method"showmodaldialog"
> > sleep(3)
> > hwnd = @ie.enabled_popup(10)
> > @ie1 = @ie.modal_dialog(:title, 'RFQ')
>
> > The error like this:
> > c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/waiter.rb:
> > 59:in `wait
> > _until': Timed out after 10.032 seconds.
> > (Watir::Exception::TimeOutException)
>
> > On Dec 16, 7:53 am, HAHAHA  wrote:
> > > I tried. The click_no_wait still cannot click the button. I think
> > > maybe it is really the configure problem.
>
> > > I use XP SP3, ruby186-27, watir1.6.2. Do you think some earlier
> > > version will be better? I know some programs cannot run in current
> > > version, like rubyscript2exe.rb.
>
> > > On Dec 16, 3:49 am, "pramod D"  wrote:
>
> > > > Hi,
>
> > > > I worked with your code and it is working fine, Only thing you need to 
> > > > do is
> > > > introduce sleep(5) just before clicking the button. It will handle the 
> > > > pop
> > > > up.
>
> > > > Thanks,
> > > > Pramod
>
> > > > On Mon, Dec 15, 2008 at 8:57 PM, HAHAHA  
> > > > wrote:
>
> > > > > Thank you for your code. I test it. But Click_no_wait still cannot
> > > > > work. The result shows "There's no popup. "
> > > > > Here is the code I used to test. I changed your code to get it.
>
> > > > > require 'watir'
> > > > >   require 'watir/ie'#
>
> > > > >   require 'watir\contrib\enabled_popup' #fafdfs
> > > > >   require 'watir/dialog'#fafsfasd
> > > > >   require 'watir/winClicker'#fasfsdfa
> > > > >   require 'thread'
> > > > > def test_001_Login
> > > > >$batchCode="0"
> > > > ># attach a new browser window
> > > > >$ie = Watir::IE.attach(:url,"about:blank")
>
> > > > >Watir::IE.attach_timeout =10
> > > > > $ie.goto('http://www.w3schools.com/js/tryit_view.asp?
> > > > > filename=tryjs_alert')
> > > > > # This website only has an alert button, you
> > > > > can test using this website.
>
> > > > >$ie.button(:index,1).click_no_wait
> > > > > begin
> > > > >hwnd = $ie.enabled_popup(5)
> > > > >if(hwnd)
> > > > >popup = WinClicker.new
> > > > >popup.makeWindowActive(hwnd) #Activate the
> > > > > window.
> > > > >popup.clickWindowsButton_hwnd(hwnd,"OK")
> > > > > #Click the OK button
> > > > >end
> > > > >rescue => e
> > > > >puts e
> > > > >puts "There is no popup"
> > > > >  end
> > > > > end
>
> > > > > test_001_Login
>
> > > > > Can you try it and see whether it can work in your computer? Thanks a
> > > > > lot.
>
> > > > > On Dec 12,10:15 pm, "pramod D"  wrote:
> > > > > > I am posting a sample code which i am using in my script
>
> > > > > > *def test_001_Login
> > > > > > $batchCode="0"
> > > > > > # attach a new browser window
> > > > > > $ie = Watir::IE.attach(:url,"about:blank")
> > > > > > Watir::IE.attach_timeout = 10.0
> > > > > > ...
> > > > > > ...
>
> > > > > > $ie.frame("mains").image(:index,1).click_no_wait
> > > > > > begin
> > > > > >   

[wtr-general] Re: Is the FireWatir-Watir integration working for you?

2008-12-18 Thread Lisa Crispin
I just haven't had time to get it working. Actually I haven't even had time
to get my whole suite of tests working again. They run individually, but
fail in a suite - windows are not getting closed and the next test fails.
The suite ran before fine although we had been having random failures we
couldn't figure out. This is a big problem for us but we've been swamped. I
am determined to figure it out this sprint and we added a story this sprint
to be sure we have time.

It is ultimately our goal to be able to use FireWatir since 100% of our team
works on a Mac. A couple of us also have PCs.

I am excited about the potential, though! I guess it's a movie I really,
really want to see how it ends!
-- Lisa

On Thu, Dec 18, 2008 at 3:09 PM, Pete Dignan  wrote:

>
> I'm curious, now that 1.6.2 has been out for a little while.  Is the
> integration of FireWatir and Watir working for you?  Are you using it
> to test on both IE and Firefox? Are there issues that are preventing
> you from using it effectively? If 1.6.2 were a movie and you were a
> movie critic, how many stars would you give it?
>
> Pete
> >
>


-- 
Lisa Crispin
Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers
and Agile Teams_ (Addison-Wesley 2009)
http://lisa.crispin.home.att.net
http://lisacrispin.blogspot.com

--~--~-~--~~~---~--~~
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] Is the FireWatir-Watir integration working for you?

2008-12-18 Thread Pete Dignan

I'm curious, now that 1.6.2 has been out for a little while.  Is the
integration of FireWatir and Watir working for you?  Are you using it
to test on both IE and Firefox? Are there issues that are preventing
you from using it effectively? If 1.6.2 were a movie and you were a
movie critic, how many stars would you give it?

Pete
--~--~-~--~~~---~--~~
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: button.Click_No_Wait only highlights the button, does not click

2008-12-18 Thread HAHAHA

I have tried to set IE to default, but it not work. Now I am trying to
reinstall ruby and watir.

On Dec 18, 11:34 am, Michael Hwee  wrote:
> First, go to your internet options and reset all your settings to default.
>
> On vista with IE7, check off the Protected Mode.
>
> Michael
>
>
>
> - Original Message 
> From: HAHAHA 
> To: Watir General 
> Sent: Wednesday, December 17, 2008 12:49:43 PM
> Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, 
> does not click
>
> I tried, even change the security of IE to Low, but the click_no_wait
> still cannot click the button.
> Now I just want to know what's the problem. Is it my IE's problem or
> Ruby's problem?
>
> On Dec 17, 11:53 am, Michael Hwee  wrote:
> > Come and think of that, have you ever got successful dismissing any other 
> > popup?
>
> > If I were you, I would be checking the browser configuration settings.
>
> > Michael
>
> > - Original Message 
> > From: Fish 
> > To: Watir General 
> > Sent: Tuesday, December 16, 2008 5:21:33 PM
> > Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, 
> > does not click
>
> > I use the ruby186-26,but still can not handle the popup...Just only
> > block at the commandline.
> > Does someone kindly do me a favor to provide code which can handle the
> > modaldialog?I very appreciate it.
> > I have tried below, but it doestn't work.
> > @ie.button(:value, "New").click_no_wait #pop up a modaldialog, by the
> > method"showmodaldialog"
> > sleep(3)
> > hwnd = @ie.enabled_popup(10)
> > @ie1 = @ie.modal_dialog(:title, 'RFQ')
>
> > The error like this:
> > c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/waiter.rb:
> > 59:in `wait
> > _until': Timed out after 10.032 seconds.
> > (Watir::Exception::TimeOutException)
>
> > On Dec 16, 7:53 am, HAHAHA  wrote:
> > > I tried. The click_no_wait still cannot click the button. I think
> > > maybe it is really the configure problem.
>
> > > I use XP SP3, ruby186-27, watir1.6.2. Do you think some earlier
> > > version will be better? I know some programs cannot run in current
> > > version, like rubyscript2exe.rb.
>
> > > On Dec 16, 3:49 am, "pramod D"  wrote:
>
> > > > Hi,
>
> > > > I worked with your code and it is working fine, Only thing you need to 
> > > > do is
> > > > introduce sleep(5) just before clicking the button. It will handle the 
> > > > pop
> > > > up.
>
> > > > Thanks,
> > > > Pramod
>
> > > > On Mon, Dec 15, 2008 at 8:57 PM, HAHAHA  
> > > > wrote:
>
> > > > > Thank you for your code. I test it. But Click_no_wait still cannot
> > > > > work. The result shows "There's no popup. "
> > > > > Here is the code I used to test. I changed your code to get it.
>
> > > > > require 'watir'
> > > > >   require 'watir/ie'#
>
> > > > >   require 'watir\contrib\enabled_popup' #fafdfs
> > > > >   require 'watir/dialog'#fafsfasd
> > > > >   require 'watir/winClicker'#fasfsdfa
> > > > >   require 'thread'
> > > > > def test_001_Login
> > > > >        $batchCode="0"
> > > > >        # attach a new browser window
> > > > >            $ie = Watir::IE.attach(:url,"about:blank")
>
> > > > >        Watir::IE.attach_timeout =10
> > > > >         $ie.goto('http://www.w3schools.com/js/tryit_view.asp?
> > > > > filename=tryjs_alert')
> > > > > # This website only has an alert button, you
> > > > > can test using this website.
>
> > > > >                $ie.button(:index,1).click_no_wait
> > > > >                 begin
> > > > >                    hwnd = $ie.enabled_popup(5)
> > > > >                    if(hwnd)
> > > > >                        popup = WinClicker.new
> > > > >                        popup.makeWindowActive(hwnd) #Activate the
> > > > > window.
> > > > >                        popup.clickWindowsButton_hwnd(hwnd,"OK")
> > > > > #Click the OK button
> > > > >                    end
> > > > >                rescue => e
> > > > >                    puts e
> > > > >                    puts "There is no popup"
> > > > >                  end
> > > > >                 end
>
> > > > > test_001_Login
>
> > > > > Can you try it and see whether it can work in your computer? Thanks a
> > > > > lot.
>
> > > > > On Dec 12,10:15 pm, "pramod D"  wrote:
> > > > > > I am posting a sample code which i am using in my script
>
> > > > > > *def test_001_Login
> > > > > >         $batchCode="0"
> > > > > >         # attach a new browser window
> > > > > >             $ie = Watir::IE.attach(:url,"about:blank")
> > > > > >         Watir::IE.attach_timeout = 10.0
> > > > > > ...
> > > > > > ...
>
> > > > > >                 $ie.frame("mains").image(:index,1).click_no_wait
> > > > > >                 begin
> > > > > >                     hwnd = $ie.enabled_popup(5)
> > > > > >                     if(hwnd)
> > > > > >                         popup = WinClicker.new
> > > > > >                         popup.makeWindowActive(hwnd) #Activate the
> > > > > window.
> 

[wtr-general] Re: How to click on a grid cell to sort?

2008-12-18 Thread maven999

Ok I had to go ahead and add support for th tag myself. I added the
following code to my Watir script:

module Watir
  class TH < NonControlElement
TAG = 'TH'
  end
  module Container
def TH(how, what)
  return TH.new(self, how, what)
end
  end
end

I can now select the element via TH tag.

Thanks all!

On Dec 18, 10:05 am, maven999  wrote:
> Hi Wilson,
>
> Unfortunately, the app is not publicly available so I cannot attach
> the html file.
>
> al3kc, I tried the xpath method you suggested but it didn't work
> either. I get the following error:
>
>   1) Error:
> test_Statistics(TC_UI):
> NoMethodError: undefined method `click' for nil:NilClass
>     C:/ruby/test/Ian.rb:167:in `test_Statistics'
>
> Its worth noting that there is more than one dojoGrid-cell in the
> grid, so thats probably why find-by-xpath failed.
>
> On Dec 18, 3:39 am, al3kc  wrote:
>
> > You can use
>
> > ie.element_by_xpath("//t...@class = 'dojoxGrid-cell']").click
--~--~-~--~~~---~--~~
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: How to handle file download popups in Firefox?

2008-12-18 Thread Margam

Hey guys,
Thanks for the input. I will certainly try, as soon as I finish with
my current project. Thanks.

Margam

On Dec 18, 3:56 am, al3kc  wrote:
> onhttp://www.autoitscript.com/forum/index.php?showtopic=81915&hl=firefo...
> I have found next code:
>
> ControlClick("Opening", "", "MozillaWindowClass1", "left", 1, 46, 158)
> sleep(1000)
> ControlClick("Opening", "", "MozillaWindowClass1", "left", 1, 241,
> 237)
> sleep(1000)
>
> All elements in "MozillaWindowClass1" has constant coordinates so you
> can click any element in this window by coordinates.
--~--~-~--~~~---~--~~
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: button.Click_No_Wait only highlights the button, does not click

2008-12-18 Thread Michael Hwee


First, go to your internet options and reset all your settings to default.

On vista with IE7, check off the Protected Mode.

Michael



- Original Message 
From: HAHAHA 
To: Watir General 
Sent: Wednesday, December 17, 2008 12:49:43 PM
Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, 
does not click


I tried, even change the security of IE to Low, but the click_no_wait
still cannot click the button.
Now I just want to know what's the problem. Is it my IE's problem or
Ruby's problem?


On Dec 17, 11:53 am, Michael Hwee  wrote:
> Come and think of that, have you ever got successful dismissing any other 
> popup?
>
> If I were you, I would be checking the browser configuration settings.
>
> Michael
>
>
>
> - Original Message 
> From: Fish 
> To: Watir General 
> Sent: Tuesday, December 16, 2008 5:21:33 PM
> Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, 
> does not click
>
> I use the ruby186-26,but still can not handle the popup...Just only
> block at the commandline.
> Does someone kindly do me a favor to provide code which can handle the
> modaldialog?I very appreciate it.
> I have tried below, but it doestn't work.
> @ie.button(:value, "New").click_no_wait #pop up a modaldialog, by the
> method"showmodaldialog"
> sleep(3)
> hwnd = @ie.enabled_popup(10)
> @ie1 = @ie.modal_dialog(:title, 'RFQ')
>
> The error like this:
> c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/waiter.rb:
> 59:in `wait
> _until': Timed out after 10.032 seconds.
> (Watir::Exception::TimeOutException)
>
> On Dec 16, 7:53 am, HAHAHA  wrote:
> > I tried. The click_no_wait still cannot click the button. I think
> > maybe it is really the configure problem.
>
> > I use XP SP3, ruby186-27, watir1.6.2. Do you think some earlier
> > version will be better? I know some programs cannot run in current
> > version, like rubyscript2exe.rb.
>
> > On Dec 16, 3:49 am, "pramod D"  wrote:
>
> > > Hi,
>
> > > I worked with your code and it is working fine, Only thing you need to do 
> > > is
> > > introduce sleep(5) just before clicking the button. It will handle the pop
> > > up.
>
> > > Thanks,
> > > Pramod
>
> > > On Mon, Dec 15, 2008 at 8:57 PM, HAHAHA  
> > > wrote:
>
> > > > Thank you for your code. I test it. But Click_no_wait still cannot
> > > > work. The result shows "There's no popup. "
> > > > Here is the code I used to test. I changed your code to get it.
>
> > > > require 'watir'
> > > >   require 'watir/ie'#
>
> > > >   require 'watir\contrib\enabled_popup' #fafdfs
> > > >   require 'watir/dialog'#fafsfasd
> > > >   require 'watir/winClicker'#fasfsdfa
> > > >   require 'thread'
> > > > def test_001_Login
> > > >$batchCode="0"
> > > ># attach a new browser window
> > > >$ie = Watir::IE.attach(:url,"about:blank")
>
> > > >Watir::IE.attach_timeout =10
> > > > $ie.goto('http://www.w3schools.com/js/tryit_view.asp?
> > > > filename=tryjs_alert')
> > > > # This website only has an alert button, you
> > > > can test using this website.
>
> > > >$ie.button(:index,1).click_no_wait
> > > > begin
> > > >hwnd = $ie.enabled_popup(5)
> > > >if(hwnd)
> > > >popup = WinClicker.new
> > > >popup.makeWindowActive(hwnd) #Activate the
> > > > window.
> > > >popup.clickWindowsButton_hwnd(hwnd,"OK")
> > > > #Click the OK button
> > > >end
> > > >rescue => e
> > > >puts e
> > > >puts "There is no popup"
> > > >  end
> > > > end
>
> > > > test_001_Login
>
> > > > Can you try it and see whether it can work in your computer? Thanks a
> > > > lot.
>
> > > > On Dec 12,10:15 pm, "pramod D"  wrote:
> > > > > I am posting a sample code which i am using in my script
>
> > > > > *def test_001_Login
> > > > > $batchCode="0"
> > > > > # attach a new browser window
> > > > > $ie = Watir::IE.attach(:url,"about:blank")
> > > > > Watir::IE.attach_timeout = 10.0
> > > > > ...
> > > > > ...
>
> > > > > $ie.frame("mains").image(:index,1).click_no_wait
> > > > > begin
> > > > > hwnd = $ie.enabled_popup(5)
> > > > > if(hwnd)
> > > > > popup = WinClicker.new
> > > > > popup.makeWindowActive(hwnd) #Activate the
> > > > window.
> > > > > popup.clickWindowsButton_hwnd(hwnd,"OK") 
> > > > > #Click
> > > > the
> > > > > OK button
> > > > > end
> > > > > rescue => e
> > > > > puts e
> > > > > puts "There is no popup"
> > > > >  end
>
> > > > > def test_005_logout
>
> > > > >  

[wtr-general] Re: How to click on a grid cell to sort?

2008-12-18 Thread maven999

Hi Wilson,

Unfortunately, the app is not publicly available so I cannot attach
the html file.

al3kc, I tried the xpath method you suggested but it didn't work
either. I get the following error:

  1) Error:
test_Statistics(TC_UI):
NoMethodError: undefined method `click' for nil:NilClass
C:/ruby/test/Ian.rb:167:in `test_Statistics'

Its worth noting that there is more than one dojoGrid-cell in the
grid, so thats probably why find-by-xpath failed.

On Dec 18, 3:39 am, al3kc  wrote:
> You can use
>
> ie.element_by_xpath("//t...@class = 'dojoxGrid-cell']").click
--~--~-~--~~~---~--~~
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: How to handle file download popups in Firefox?

2008-12-18 Thread al3kc

on 
http://www.autoitscript.com/forum/index.php?showtopic=81915&hl=firefox+download+window
I have found next code:

ControlClick("Opening", "", "MozillaWindowClass1", "left", 1, 46, 158)
sleep(1000)
ControlClick("Opening", "", "MozillaWindowClass1", "left", 1, 241,
237)
sleep(1000)

All elements in "MozillaWindowClass1" has constant coordinates so you
can click any element in this window by coordinates.
--~--~-~--~~~---~--~~
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: Does Watir recognize toolbars/toolbar objects in Firefox and IE browsers?

2008-12-18 Thread Wilson Xu
What's the kind of toolbar, can you give us a example?
Wilson

On Thu, Dec 18, 2008 at 6:35 AM, Sriniv wrote:

>
> All,
>
> I would like to automate my testing for a toolbar and am wondering if
> WATIR recognizes toolbar and its objects in IE and Firefox browsers.
>
> Looked at all the so called commercial test automation tools but none
> are up to the job.
>
> Any info in this regard will be appreciated...
>
> -Sriniv
>
> >
>

--~--~-~--~~~---~--~~
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: How to click on a grid cell to sort?

2008-12-18 Thread al3kc

You can use

ie.element_by_xpath("//t...@class = 'dojoxGrid-cell']").click
--~--~-~--~~~---~--~~
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: How to handle file download popups in Firefox?

2008-12-18 Thread al3kc

I cannot set radio button. It's an issue for me too. I just have
selected "Save file" by default in FF.
--~--~-~--~~~---~--~~
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] is watir able to identify DOM objects?

2008-12-18 Thread Shanthala

Hi,

We have developed our application using gwt.
Is there a mechanism to identify all the DOM objects of a page or some
kind of mechanism to have a repository of DOM objects in watir?

Thanks in advance,
Shanthala.


--~--~-~--~~~---~--~~
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] Does Watir recognize toolbars/toolbar objects in Firefox and IE browsers?

2008-12-18 Thread Sriniv

All,

I would like to automate my testing for a toolbar and am wondering if
WATIR recognizes toolbar and its objects in IE and Firefox browsers.

Looked at all the so called commercial test automation tools but none
are up to the job.

Any info in this regard will be appreciated...

-Sriniv

--~--~-~--~~~---~--~~
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: How to click on a grid cell to sort?

2008-12-18 Thread Wilson Xu

According to the HTML source code, there is not a hyper-link, so
that's why you got the message error.
Can you attach a HTML file, maybe I can help you.
Wilson Xu

On Dec 18, 5:26 am, maven999  wrote:
> I use the following line to locate the cell:
>
> $ie.div(:id, 'dbGrid').div(:class, 'dojoxGrid-master-header').table
> (:class, 'dojoxGrid-row-table').th(:text, 'stat_name').click
>
> I get the following error on console:
>
>   1) Error:
> test_Statistics(TC_UI):
> NoMethodError: undefined method `th' for #
>     C:/ruby/test/Ian.rb:165:in `test_Statistics'
>
> 1 tests, 0 assertions, 0 failures, 1 errors
>
> On Dec 17, 4:13 pm, "Nathan Lane"  wrote:
>
> > Have you tried th.click ? It is a standard tag, so it doesn't seem logical
> > that  wouldn't be supported by Watir, but I could be wrong.
>
> > On Wed, Dec 17, 2008 at 1:11 PM, maven999  wrote:
>
> > > Hi,
>
> > > I have a dojo grid that I want to sort by column. The grid has 2
> > > header cells named stat_name and stat_value. The header cell by
> > > default does not have a 'sort' arrow that I can click. The sort button
> > > becomes visible when I click on the header cell the first time, after
> > > which I can sort up or down. The html source for the header cell (with
> > > text 'stat_name' or 'stat_value') is:
>
> > >  > >    > >      > >         > >           
>
> > >                > > _zipIdx="22" role="wairole:columnheader"  unselectable="on"
> > > idx="0">stat_name
>
> > >               
>
> > >                > > _zipIdx="22" role="wairole:columnheader" unselectable="on"
> > > idx="1">stat_value > > _zipIdx="22" unselectable="on">
>
> > >           
> > >         
> > >        
> > >      
> > >    
> > >  
> > > 
>
> > > As far as I know, Watir does not support a TH tag. Any idea on how I
> > > can locate this header cell and click it?
>
> > > Thanks!
>
> > --
> > Nathan Lane
> > Home,http://www.nathandelane.com
> > Blog,http://nathandelane.blogspot.com

--~--~-~--~~~---~--~~
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: How to handle file download popups in Firefox?

2008-12-18 Thread Wilson Xu

The first step: Use Send("{TAB}") event to focus on the radio what you
want.
The second step: Use Send("{DOWN}") or Send("{UP}") event to select
radio,
I think this way is not stable, but can resolve your issue.

Wilson Xu

On Dec 18, 2:09 am, Margam  wrote:
> Hi al3kc,
>
> THANK YOU very much. Your code snippet worked great the very first
> time. I just had to modify it a little for my use, but worked just
> fine.
>
> I was having another question regarding the file download popup and
> was wondering if you could help with some advice.
> How to handle the radio buttons ("Open with" and "Save File") in the
> popup. The default being "Save File" works for me now. But how do I
> choose the other option?
> Also how to check a check box in the popup.
>
> Thank you very much once again.
>
> Margam
>
> On Dec 17, 2:41 am, al3kc  wrote:
>
> > Hi,
>
> > I use next code and it works for me
>
> >   �...@ai = WIN32OLE.new("AutoItX3.Control")
> >   �...@ai.winwaitactive("[REGEXPTITLE:Opening]")
> >   �...@ai.send("{ENTER}")
> >   �...@ai.winwait("Enter name of file to save to…", "", 5)
> >   �...@ai.winactivate("Enter name of file to save to…")
> >    sleep(7)
> >   �...@ai.send("#{$test_directory}\\#{name}")
> >    sleep(5)
> >   �...@ai.controlclick("Enter name of file to save to…", "", "&Save")
> >    sleep(1)
>
> > To print path for saving I use @ai.Send("#{$test_directory}\\#
> > {name}")  instead of  ai.ControlSend("Enter name of file to save
> > to...", "",
> > "Edit",filepath) because this always type massed text.

--~--~-~--~~~---~--~~
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: how to handle javascript popups problem with firewatir

2008-12-18 Thread Wilson Xu

You can use autoITx lib to handle Javascript pop-up window in the
Firefox.

On Nov 29, 8:10 am, "Paul Rogers"  wrote:
> ;-)
>
> we did talk about it a little bit. Heres some suggestions:
>
> overwrite the javascript alert method, so it displays a 'modal' div in a
> light box, like google calendars. ( selenium does something like this)
> get your web designers/developers to stop using alerts - they are a really
> unpleasant user experience
>
> Paul
>
> On Fri, Nov 28, 2008 at 7:48 AM, Dave McNulla  wrote:
>
> > On Nov 26, 6:42 pm, Dave McNulla  wrote:
> > > On Nov 26, 1:00 am, Jarod Zhu  wrote:
>
> > > > I am using firewatir-1.6.2 to make a web automation tool in my
> > > > project.
> > > > I come to the problem that I can't click the javascript popup "OK"
> > > > button successfully.
>
> > > > I use the code like this:
>
> > ***
> > ***
> > > > browser.startClicker('ok', 20)
> > > > browser.button(:id, 'confirm').click  # pop the javascript window
>
> > ***
> > ***
> > > > Actually, the code above make the javascript popup nerver appear, but
> > > > the popup "OK" button is not clicked. So it just make the the
> > > > javascript popup disabled.
>
> > > > Anyone here know how to handle javascript popups with
>
> > > The general answer is don't use the javascript popups.
>
> > > I'd like to hear Paul Rodgers discuss alternatives to them in the
> > > podcast on Friday.
>
> > > Thanks in advance
> > > Dave
>
> > oops. I meant Paul Rogers, the one that isn't in 'bad company'.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---