Re: [Wtr-general] How to make sure that script run in line squence rather than alphabetical sequence when using load
Maybe this will help. http://wiki.openqa.org/display/WTR/Test-Unit+Patch -- Zeljko Filipin zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] WTR-103 comment spam
I was browsing Watir Jira tickets, and WTR-103 has a lot of comment spam. -- Zeljko Filipin zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Wait issue with file_field.set, solution
I think that the addition of the click to file_field.set in this change (see thread below) is causing one of my tests to hang during the @container.wait in the click method. However, this problem didn't show up until after the changes to the wait functionality in mid-February. Or so my theory goes . . . The fix, in my case, is to change the click to a click! in file_field.set, by-passing the @container.wait in the click method. I suppose I could use a time-out technique instead. I can't provide a test case, unfortunately, because I don't have a handle on all the javascript eventing and fancy ajax-y reload in various frames that's going on in a generated SAP business server pages app. I think this is a relatively well-known issue with ajax-like apps. Please correct me if I'm wrong. Attached is a patch to the 1.5.1163 revision that illustrates the way I've modified watir.rb to allow me to specify wait behavior in the file_field.set method. The watir 1.5.1163 - no_wait option in file_field.set.patch basically throws any extra arguments on file_field.set into an args_hash Hash. The set method then checks for the :no_wait key and either clicks or click!s based on that key. So, file_field.set(path) results in a click file_field.set(path, :no_wait = false) results in a click file_field.set(path, :no_wait = true) results in a click! The upside here is that this doesn't change existing behavior. The downside is that it is kind of a hack as it stands. I think that implementing this sort of functionality in a more general (and perhaps better thought-out) way would give a lot of flexibility to those of us dealing with ajax goodness to manually override wait functionality when necessary. It might also be a reasonably standard way to allow granular control of other functionality on a method-call by method-call basis. Is this reasonable? Has something like this been decided against in the past? Is it too big a change for 1.5? Thoughts on problems? Improvements? Maybe using :wait = false instead of :no_wait = true would be more intuitive? I don't think this patch is ready to go into the code-base as it stands, even if people think it is a reasonable approach, but I'll submit a Jira ticket once I have something that I think will work. Thanks, Ethan On 1/10/07, Bret Pettichord [EMAIL PROTECTED] wrote: John Lolis wrote: I registered AutoItX3.dll using regsvr32 and it got rid of the error message, the problem now is it doesn't fill in the field with any text. I can flash it, so i know I have the right field - I just can't put anything in there. any more ideas? Today I checked in fixes for both this and the other problem (autoit registration). These are NOT in today's dev gem, but will be in the next one. You can pull them from trunk if you like. A workaround for this problem for earlier versions of 1.5 is this: 1. Manually register autoit: regsvr32 AutoItX3.dll 2. Add a call to click: ie.file_field(:id, 'DriverFileUpload_DriverFileUpload').set(filename) ie.file_field(:id, 'DriverFileUpload_DriverFileUpload').click Please let us know if either of these solutions does not fix this problem for anyone. Bret ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general watir 1.5.1163 - no_wait option in file_field.set.patch Description: Binary data ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Excel Interface Class
I'm not sure why you can't access those links, I just went to both of them and the pages opened fine. Can you access them through the main site? http://www.openqa.org/watir and follow the links to FAQ and/or wiki. -c On 3/6/07, swarna latha [EMAIL PROTECTED] wrote: Hi, I am unable to access the links http://wiki.openqa.org/display/WTR/Excel+interface+class and http://wiki.openqa.org/display/WTR/FAQ and I think it would be of great help to me if I can! It gives me Page cannot be displayed error. I have been trying to access it since the last 2 days..:( Any ideas why? Thanks Billy for the code snippet pointer to clear cache issue. Thanks, Swarna. I've posted an Excel Interface class which I've developed over the past few months on the Watir openqa.org site under contributions: http://wiki.openqa.org/display/WTR/Excel+interface+class This class provides simple methods for reading data records from Excel spreadsheets, hides the complexities of directly using ruby's win32ole library to interface with Excel, and makes it much easer to create data-driven Watir tests. I hope it will be as useful to others as it has been for me. -David Brown ___ Wtr-general mailing list -- Bored stiff? http://us.rd.yahoo.com/evt=49935/*http://games.yahoo.comLoosen up... Download and play hundreds of games for freehttp://us.rd.yahoo.com/evt=49935/*http://games.yahoo.comon Yahoo! Games. ___ 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 get the run result for each test case
This is really more about test::unit than Watir. Watir doesn't report results or contain your tests, test unit does. You could modify the test reporter in test unit if you want more immediate feedback. Running through Eclipse with the ruby plugin also gives more immediate feedback I believe, it's been a while since I've run tests through the Eclipse UI so don't quote me on that. :) http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html -Charley On 3/6/07, Jason He [EMAIL PROTECTED] wrote: Dear All, It seems that watir give the detail information of test only at the end of test, in other word, the detail report will give out only after all the test cases have been executed, in case that there is a lot of test cases and each case is written in a standalone file . Could it give the detail information for each test case when they are finished at once, such as the information about whether pass or fail, the corresponding line if failure/error happens? Regards, Jason ___ 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] Excel Interface Class
I have noticed that this site (wiki.openqa.org) works fine with firefox but doesn't seem to work with internet explorer. -David From: swarna latha [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 06, 2007 6:49 PM To: Brown, David Cc: [EMAIL PROTECTED]; wtr-general@rubyforge.org Subject: Re:[Wtr-general] Excel Interface Class Hi, I am unable to access the links http://wiki.openqa.org/display/WTR/Excel+interface+class http://wiki.openqa.org/display/WTR/Excel+interface+classand http://wiki.openqa.org/display/WTR/FAQ and I think it would be of great help to me if I can! It gives me Page cannot be displayed error. I have been trying to access it since the last 2 days..:( Any ideas why? Thanks Billy for the code snippet pointer to clear cache issue. Thanks, Swarna. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Seemingly bogus error in simple script
I'm brand new at this. I've created a very simple script to test a login page... require 'watir' ie = Watir::IE.start(http://mysite;) ie.text_field(:name, j_username).set(blah) ie.text_field(:name, j_password).set(blah) ie.button(:value, Submit).click If I execute these commands manually in irb, I have no problem. If I execute the script that contains them from the command line, I get this error: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1928:in `assert_exists': Unable to locate object, using name and j_username (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:3382:in `set' from Z:/Customers/Beneplace/Beneplace Redesign/WATIR tests/admin-login.rb:5 Even though I get the error, the actions occur - the text is entered into the text boxes, the button is clicked, and I see the next page. If I put additional commands AFTER the click, they do not get executed. This is being used with a JSP page, if that makes any difference, and IE7. Thanks for any help. Steven - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6823messageID=19642#19642 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Seemingly bogus error in simple script
I can only assume there are some timing issues. I'd recommend using a more recent version of Watir which you can pull from the home page on openqa: http://www.openqa.org/watir or build your own from the repository which is on the FAQ page under Installing a Gem from the latest development source. If you use the latest version of Watir, you should be able to wait for controls on the page to exist. require 'watir' include Watir ie = IE.start('http://blah) wait_until{ie.text_field(:name, 'j_username').exists?} ie.text_field(:name, j_username).set(blah) ie.text_field(:name, j_password).set(blah) ie.button(:value, Submit).click Without any insight into your actual problem, code snippets or the like, this is my best guess. -Charley On 3/7/07, Steven List [EMAIL PROTECTED] wrote: I'm brand new at this. I've created a very simple script to test a login page... require 'watir' ie = Watir::IE.start(http://mysite;) ie.text_field(:name, j_username).set(blah) ie.text_field(:name, j_password).set(blah) ie.button(:value, Submit).click If I execute these commands manually in irb, I have no problem. If I execute the script that contains them from the command line, I get this error: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1928:in `assert_exists': Unable to locate object, using name and j_username (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:3382:in `set' from Z:/Customers/Beneplace/Beneplace Redesign/WATIR tests/admin- login.rb:5 Even though I get the error, the actions occur - the text is entered into the text boxes, the button is clicked, and I see the next page. If I put additional commands AFTER the click, they do not get executed. This is being used with a JSP page, if that makes any difference, and IE7. Thanks for any help. Steven - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6823messageID=19642#19642 ___ 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] Problems mapping to: http://forums.openqa.org/post!default.jspa?forumID=5
My bad...the wrong url posted. ;-) This is the one I'm referring to: http://forums.openqa.org/forum.jspa?forumID=5 - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6828messageID=19654#19654 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Seemingly bogus error in simple script
Upgrading to the latest development version fixed the problem. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6823messageID=19650#19650 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Problems mapping to: http://forums.openqa.org/post!default.jspa?forumID=5
Please note...clicking on this link from within this forum ...maps fine. To duplicate my problem, I have to open a new IE browser and enter paste the URL in there. That's when I get my error. It looks to me like something isn't mapping right somewhere. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6828messageID=19655#19655 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Seemingly bogus error in simple script
I am a new user to ruby/watir as well...maybe we can get through this together :) Basically, I did the same thing...launch irb and type commands to see what happens. It was my experience that if it worked in irb, it worked in the script. However, I am using ie6. I haven't tried ruby/watir with ie7 yet... In irb, try using the ie.show_all_objects. This generates a table of all the objects on the current page. This was helpful for me to build the list of objects for my script. Maybe using a later version of watir is required? I am using 1.5.1.1158. ruby -e 'require watir; puts Watir::IE::VERSION' 1.5.1.1158 ruby --version ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32] I'm brand new at this. I've created a very simple script to test a login page... require 'watir' ie = Watir::IE.start(http://mysite;) ie.text_field(:name, j_username).set(blah) ie.text_field(:name, j_password).set(blah) ie.button(:value, Submit).click If I execute these commands manually in irb, I have no problem. If I execute the script that contains them from the command line, I get this error: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb: 1928:in `assert_exists': Unable to locate object, using name and j_username (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb: 3382:in `set' from Z:/Customers/Beneplace/Beneplace Redesign/WATIR tests/admin-login.rb:5 Even though I get the error, the actions occur - the text is entered into the text boxes, the button is clicked, and I see the next page. If I put additional commands AFTER the click, they do not get executed. This is being used with a JSP page, if that makes any difference, and IE7. Thanks for any help. Steven - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6823messageID=19647#19647 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Problems mapping to: http://forums.openqa.org/post!default.jspa?forumID=5
Is anyone else having problems going directly to this url: http://forums.openqa.org/post!default.jspa?forumID=5 Since yesterday, I have been unable to use my link in Internet Explorer that takes me directly to the Watir Forum. I get the following error: Internet Explorer cannot open the Internet site: http://forums.openqa.org/post!default.jspa?forumID=5 Operation Aborted Going to this url via Firefox works fine. I can access the forum by using the link off of the main site, clicking forums, and then Watir. Anyone know how to pass on this information to the forum managers of this site?? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6828messageID=19653#19653 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Problems mapping to: http://forums.openqa.org/post!default.jspa?forumID
Seems to be a common problem. If I click on the link referenced in the previous post, then it works fine. However, if I open a new browser and paste in the url, then an Operation aborted error occurs and the page does not display. Please note...clicking on this link from within this forum ...maps fine. To duplicate my problem, I have to open a new IE browser and enter paste the URL in there. That's when I get my error. It looks to me like something isn't mapping right somewhere. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6828messageID=19657#19657 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Seemingly bogus error in simple script
You didn't say there was an error or anything went wrong. I'd recommend ie developer toolbar over show_all_objects. The link is on the FAQ site. Otherwise, are you having problems? -Charley On 3/7/07, matt [EMAIL PROTECTED] wrote: I am a new user to ruby/watir as well...maybe we can get through this together :) Basically, I did the same thing...launch irb and type commands to see what happens. It was my experience that if it worked in irb, it worked in the script. However, I am using ie6. I haven't tried ruby/watir with ie7 yet... In irb, try using the ie.show_all_objects. This generates a table of all the objects on the current page. This was helpful for me to build the list of objects for my script. Maybe using a later version of watir is required? I am using 1.5.1.1158. ruby -e 'require watir; puts Watir::IE::VERSION' 1.5.1.1158 ruby --version ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32] I'm brand new at this. I've created a very simple script to test a login page... require 'watir' ie = Watir::IE.start(http://mysite;) ie.text_field(:name, j_username).set(blah) ie.text_field(:name, j_password).set(blah) ie.button(:value, Submit).click If I execute these commands manually in irb, I have no problem. If I execute the script that contains them from the command line, I get this error: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb: 1928:in `assert_exists': Unable to locate object, using name and j_username (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb: 3382:in `set' from Z:/Customers/Beneplace/Beneplace Redesign/WATIR tests/admin-login.rb:5 Even though I get the error, the actions occur - the text is entered into the text boxes, the button is clicked, and I see the next page. If I put additional commands AFTER the click, they do not get executed. This is being used with a JSP page, if that makes any difference, and IE7. Thanks for any help. Steven - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6823messageID=19647#19647 ___ 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] WIN32OLERuntimeError: unknown property or method `readOnly'
Hi all, I am getting an unfamiliar error and hoping someone can lend a hand. I'm currently using Watir 1.5.1.1145 I just got: ruby create_many_messages.rb Loaded suite create_many_messages Started E Finished in 4.544 seconds. 1) Error: test_send_many_messages(TC_SendManyMessages): WIN32OLERuntimeError: unknown property or method `readOnly' HRESULT error code:0x80020006 Unknown name. (eval):3:in `invoke' (eval):3:in `readonly?' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:3798:in `assert_not_readonly' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:3884:in `set' create_many_messages.rb:17:in `test_send_many_messages' 1 tests, 0 assertions, 0 failures, 1 errors Exit code: 1 After trying: $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'unittests/setup' class TC_SendManyMessages Test::Unit::TestCase include Watir $email = [EMAIL PROTECTED] $pw = password def test_send_many_messages $ie.goto( http://carolinerr.realgirlsmedia.local/public/login/show_login_page;) $ie.text_field(:id ,label_user_email).set($email)# THIS IS THE LINE IT CHOKES ON $ie.text_field(:id ,label_user_password).set($pw) $ie.link(:name, login_button).click end #def end A search of the archives gave me http://forums.openqa.org/thread.jspa?messageID=10228 ...but this seems to have been fixed in 9/06, so I think I must be hitting something different. Am I screwing something up here? BTW, our site is public so the code above should execute for you...just as poorly as it executes for me. ;0) Thanks in advance for any help, Jeff BTW, I remember in the past watir left IE open unless I explicitly called ie.close. When I'm coding, I often like to leave IE open to see where I bombed. Is there a way I can switch back to not automagically cleaning up while I'm coding? I did a quick search of watir.rb but didn't see anything promising. Thanks again. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general