Re: [Wtr-general] How to click an image button
ie.button(:src /image.jpg).click - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6309messageID=18919#18919 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] VBScript Fails with Watir
Could you please post your fixed html + watir? What exactly did you fix? Could this be an environmental problem? Maybe i'm using a different IE (6) or OS (W2K3) ?? Did you fix the error in both examples i posted? This is error will completely shut down any Watir use at my company, and I am so excited to use such a cool tool... I really need to know how you fixed it!!! Thank you very much. FV - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6554messageID=18924#18924 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Problem with wrapper created around Watir.rb
Hi all In My testcases I created a wrapper around Watir.rb def login(ie,username,password) ie.text_field(:name, ranger_user[name]).set(username) ie.text_field(:name, ranger_user[password]).set(password) ie.button(:name, commit).click sleep 2 return ie.frame(ifr_content)#returns the iframe object end where login is the function called in my testcase . After that whenever the screen refreshes the object is lost.And all other funtctions start failing. Do we need to modify the refresh method for this or there is any other workaround. Thanks and regards Ajitesh Srinetra ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Watir.. close, but not close enough
I think the problem for the OP is that we don't have good examples/documentation describing this approach. I don't feel that its a problem Watir needs to solve. If the community really did want some framework I think it would be a project separate from Watir. I'm not even sure a project like that would work. Every application that needs testing is probably going to need a slightly different approach. If someone attempts to write a 'be all end all' framework its probably going to end up very complex and hard to understand (see most commercial testing packages). Watir's strength, to me, is the fact you bring your knowledge of testing and coding together. Its a great tool that grows with you and rarely holds you back. I did in fact run into the problem of a 'test harness', but I asked some questions and just tried something - and it failed, i then tossed it and tried again - and it worked. I have a strong feeling if and when i try a new project it will be even better. Its kind of a like a hand saw. Anyone with a saw can cut wood, but it truly takes experience to cut wood well (too out there?). Anywho, my 2g's :) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6532messageID=18925#18925 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] OT: Test unit reporter project dead?
where does one get the gem? it doesn't appear to be on rubyforge. --Mark From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nick Sieger Sent: Sunday, February 18, 2007 11:59 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] OT: Test unit reporter project dead? On 2/17/07, Charley Baker [EMAIL PROTECTED] wrote: I guess I'm not too surprised, its been a long time since there's been any active development on the project, it is definitely a big void to fill however. Nick, glad to hear about ci reporter, I will definitely be taking a look at it. I'm currently using the xml output of test runs through test reporter for Cruise Control, the only modification I've made is to add assertion counts to the report. I'm not tracking assertion counts right now in CI::Reporter, so if you end up making the same change again, feel free to send me a patch and I'd be happy to add it. /Nick ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] OT: Test unit reporter project dead?
http://rubyforge.org/frs/?group_id=2857release_id=9716 I think that will get you want you want - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6596messageID=18947#18947 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Attach problem when remotely running tests using telnet
Paul, Thanks for looking. I think I'm just going to take out the attach method in most places (for now, anyway) and replace the methods I'm currently using with some new methods for the IE class. John --- Paul Rogers [EMAIL PROTECTED] wrote: the attach method is different to the new method ( for creating a browser) of watir as it uses the wshell object http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/objects/shell/windows.asp?frame=true I suspect, but couldnt find anything to really help, that it is something to do with that. - Original Message - From: John Fitisoff [EMAIL PROTECTED] To: wtr-general@rubyforge.org Sent: Monday, February 19, 2007 5:51 PM Subject: [Wtr-general] Attach problem when remotely running tests using telnet I think that this may be one of those Doctor, it hurts when I do that... questions (where the answer is: then DON'T do that...). But here goes... I have a test framework and am using the attach method pretty liberally throughout it. I'm using it in the test login routine to close existing windows and to provide navigation methods for some test classes: w = Widget.new w.widget_details_page This works fine for normal use, but I'm trying to make tests available to some of the engineers at our company that aren't developing on Windows. If I use telnet or SSH to log in to my system and then run the same tests, the attach method starts to consistently fail as shown below. I've spent most of my time connecting via telnet. The telnet service is set to interact with the desktop and the user account I'm using has the appropriate privileges (Administrator and User). Even if I create two IE instances during the session and then try to attach instance 1 to the browser window for instance 2, I get the WIN32OLERuntimeError error. Anyone have any ideas? Is there something I'm missing? The tests seem to be OK otherwise, it's just the attach method that's causing problems... Thanks... John 1) Error: test_01_CheckFoo(TC_01_CheckFoo): WIN32OLERuntimeError: Windows OLE error code:80040154 in Unknown No Description HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1600:in `method_missing' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1600:in `_find' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1632:in `attach_browser_window' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:208:in `until_with_timeout' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir/waiter.rb:53:in `wait_until' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:208:in `until_with_timeout' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1631:in `attach_browser_window' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1512:in `attach_init' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1505:in `attach' C:/eclipse/workspace/watir/ie/tests/foo/test_foo.rb:35:in `test_01_CheckFoo' 1 tests, 0 assertions, 0 failures, 1 errors Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com ___ 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 Looking for earth-friendly autos? Browse Top Cars by Green Rating at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Print statements
Good afternoon: This is going to be an extremely silly question. I am trying to troubleshoot a script so I thought I could use a print statement after each line of code. My first puts statement displays the proper output on the Eclipse Console. All of the puts statements within the CLASS do not display to the console. I tried substituting print. I searched various ruby programming guides and the solution is just not jumping out at me. With a Class or method what is the proper syntax for printing a statement to the console? Thanks in advance for your suggestions! Carl puts ## Begin test THIS WORKS FINE! class DNX_1 Test::Unit::TestCase def test 1 puts Howdy THIS DOES NOT WORK! @ie.link(:text, ADD NEW...).click puts Howdy THIS DOES NOT WORK! end end Carl L. Shaulis Convergys - Senior Analyst 512-634-0607 -- NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Windows 2003 64-bit and IE.new_process Fails
I'm on Windows XP but IE.new_process fails for me as well. Here is the error I am recieving c:/tools/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir/contrib/ie-new-pro cess.rb:46:in `method_missing': hwnd (WIN32OLERuntimeError) OLE error code:80004005 in Unknown No Description HRESULT error code:0x80020009 - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6573messageID=18955#18955 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Print statements
works for me ;-) require 'test/unit' puts ## Begin test THIS WORKS FINE! class DNX_1 Test::Unit::TestCase def test1 puts Howdy #THIS DOES NOT WORK! assert( true ) puts Howdy #THIS DOES NOT WORK! assert_equal( 1,1) end end produces ## Begin test THIS WORKS FINE! Loaded suite C:/temp/carl Started Howdy Howdy . Finished in 0.0 seconds. 1 tests, 2 assertions, 0 failures, 0 errors Are you possibly overriding the puts statement? Also breakpoint is way nicer for debugging require 'test/unit' require 'breakpoint' puts ## Begin test THIS WORKS FINE! class DNX_1 Test::Unit::TestCase def test1 a = true breakpoint assert(a ) puts Howdy #THIS DOES NOT WORK! assert_equal( 1,1) end end when it reaches the breakpoint line, it creates an irb session, allowing you to do puts a or a= false or whatever and then when you exit the irb session, normal execution of the script resumes - Original Message - From: [EMAIL PROTECTED] Date: Tuesday, February 20, 2007 1:59 pm Subject: [Wtr-general] Print statements Good afternoon: This is going to be an extremely silly question. I am trying to troubleshoot a script so I thought I could use a print statement after each line of code. My first puts statement displays the proper output on the Eclipse Console. All of the puts statements within the CLASS do not display to the console. I tried substituting print. I searched various ruby programming guides and the solution is just not jumping out at me. With a Class or method what is the proper syntax for printing a statement to the console? Thanks in advance for your suggestions! Carl puts ## Begin test THIS WORKS FINE! class DNX_1 Test::Unit::TestCase def test 1 puts Howdy THIS DOES NOT WORK! @ie.link(:text, ADD NEW...).click puts Howdy THIS DOES NOT WORK! end end Carl L. Shaulis Convergys - Senior Analyst 512-634-0607 -- NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronicmail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected. ___ 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] Attach problem when remotely running tests using telnet
I also ran into this problem a while back. After trying the same options you listed, I wound up working around it by using Windows task scheduler to run the scripts that needed the attach method. It was a bummer to not be able to manually start the scripts from a remote machine whenever I wanted, though. A while later, I was introduced to the Ruby gserver library. A quick test seems to show that the attach method works fine when I remotely start a Watir script using a little gserver-based server. So, this might solve the problem for you too. Below I've pasted my gserver script. When this is run, it loops forever listening on 0.0.0.0 port 10001. So, if you open a browser on an external machine and point it at http://[your-hostname]:10001, it should execute the serve() method and the system('ruby attach_test.rb') statement inside it. The script expects attach_test.rb in the same dir as the gserver script. Also, I suppose you'd need to set up a Windows firewall exception if you have it enabled. watirserver.rb: == # Executes 'attach_test.rb' whenever someone connects to port 10001 require 'gserver' class WatirServer GServer def initialize(port=10001, host='0.0.0.0') super(port, host, Float::MAX, $stderr, true) end def serve(io) system('ruby attach_test.rb') end end server = WatirServer.new server.start server.join == attach_test.rb : == require 'watir' ie = Watir::IE.new.goto('www.google.com') ie2 = Watir::IE.attach(:title, /Google/) ie2.text_field(:name, 'q').set('Ruby') ie2.button(:name, 'btnG').click == ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] VBScript Fails with Watir
there were some function calls, isNumber and CheckNumber ( maybe ) in the vbscript that werent working. Maybe you had those in another file? I think I changed isnumber to isNumeric I also changed this line input name=txtIdentification size=8 maxlength=8 id=txtIdentification value= onBlur=javascript:VerifyIdentification(this.value); which stopped some of the expected end of staement errors. I dont think I changed any of your ruby code. Paul - Original Message - From: Federico Vela [EMAIL PROTECTED] To: wtr-general@rubyforge.org Sent: Tuesday, February 20, 2007 6:05 AM Subject: Re: [Wtr-general] VBScript Fails with Watir Could you please post your fixed html + watir? What exactly did you fix? Could this be an environmental problem? Maybe i'm using a different IE (6) or OS (W2K3) ?? Did you fix the error in both examples i posted? This is error will completely shut down any Watir use at my company, and I am so excited to use such a cool tool... I really need to know how you fixed it!!! Thank you very much. FV - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6554messageID=18924#18924 ___ 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] Attach problem when remotely running tests using telnet
Bill, This is really great! I subsequently got things working by going to the objectspace, finding the ie object and then assigning it to an object within the navigation method each time that it got called. But this seems like a better way of doing it. And if it works for the attach method it may work for file_field too (am getting an ole error there as well). I'm reading the gserver rdocs tonight and will try these scripts tomorrow. Thanks for posting this! John --- Bill Agee [EMAIL PROTECTED] wrote: I also ran into this problem a while back. After trying the same options you listed, I wound up working around it by using Windows task scheduler to run the scripts that needed the attach method. It was a bummer to not be able to manually start the scripts from a remote machine whenever I wanted, though. A while later, I was introduced to the Ruby gserver library. A quick test seems to show that the attach method works fine when I remotely start a Watir script using a little gserver-based server. So, this might solve the problem for you too. Below I've pasted my gserver script. When this is run, it loops forever listening on 0.0.0.0 port 10001. So, if you open a browser on an external machine and point it at http://[your-hostname]:10001, it should execute the serve() method and the system('ruby attach_test.rb') statement inside it. The script expects attach_test.rb in the same dir as the gserver script. Also, I suppose you'd need to set up a Windows firewall exception if you have it enabled. watirserver.rb: == # Executes 'attach_test.rb' whenever someone connects to port 10001 require 'gserver' class WatirServer GServer def initialize(port=10001, host='0.0.0.0') super(port, host, Float::MAX, $stderr, true) end def serve(io) system('ruby attach_test.rb') end end server = WatirServer.new server.start server.join == attach_test.rb : == require 'watir' ie = Watir::IE.new.goto('www.google.com') ie2 = Watir::IE.attach(:title, /Google/) ie2.text_field(:name, 'q').set('Ruby') ie2.button(:name, 'btnG').click == ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general