From Jason.He at resilience.com Thu Mar 1 00:38:47 2007 From: Jason.He at resilience.com (Jason He) Date: Wed, 28 Feb 2007 21:38:47 -0800 Subject: [Wtr-general] Can Watir be paused & resumed manually whenrunning In-Reply-To: <20070228224554.52701.qmail@web54106.mail.yahoo.com> Message-ID: Thanks very much for you advice, it works and is really convenient. One thing I notice is that, in this solution, if the script executing has been entering the block of functions whose prefix begin with "test_" (required by watir test), it will pause only after the finish the whole block of that function, rather than pause at the moment when I selecting part of the console window. For example, ----------------------------------------------- 100 def test_b 101 goto_System_Admin 102 arr = Array.new 103 arr[0] = "specify the IP address of name servers for your environment." 104 goto_Verify_Help("nameserver", arr) 105 end ----------------------------------------------- Imaging the script executing has been entering function test_b, now is executing line 101, I try to pause it by selecting part of the console window at that moment, however, it continue to execute until finish executing line 105. If it could be paused at the moment when selecting part of console window, it will be better. Regards, Jason -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of John Fitisoff Sent: 2007?3?1? 6:46 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Can Watir be paused & resumed manually whenrunning > How to catch keyboard input signal by manual to > pause/resume the testing process, for example using > CTRL+P to pause and CTRL+R to resume. There's a really easy, low-tech way to do this in Windows. Any console application can be paused by selecting part of the console window. Try this: -Open a windows command prompt. -Right-click on the title bar and select Properties. -Select the Options tab, check QuickEdit Mode, click OK. -Start running the test script. -Stop the script by selecting some area of the console window so that it's now highlighted (it may take a second for the current browser action to finish completing). -Right-click in the window to clear the selected area so the script can continue. It's basically the same as a keypress option without the need to worry about coding the behavior. --- Jason He wrote: > Yeah, ruby-breakpoint could pause the application, > but it depends on the program and the test > condition. > > How to catch keyboard input signal by manual to > pause/resume the testing process, for example using > CTRL+P to pause and CTRL+R to resume. > > Thanks, > Jason > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > Of John Lolis > Sent: 2007??2??27?? 21:06 > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Can Watir be paused & > resumed manually when running > > I like using > > http://rubyforge.org/projects/ruby-breakpoint/ > > all you do is call "breakpoint()" and the > application stops. The best part is that you are now > at the IRB prompt so you can do all sorts of fun > things :) > > I setup my smoke test to call break point on any > exception, i can then hop in and see exactly whats > going on and fix it. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6704&messageID=19277#19277 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general ____________________________________________________________________________________ Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From forum-watir-users at openqa.org Thu Mar 1 00:53:54 2007 From: forum-watir-users at openqa.org (Simba) Date: Wed, 28 Feb 2007 23:53:54 CST Subject: [Wtr-general] Button identification In-Reply-To: <47533678.1172681865217.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <56685644.1172728464529.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, Thanks Charley for your replay but we can not use Devtoolbar in IE browser they [developers] are disabling IE toolbar as soon as we log in to our application.(Even F5 & F11 is disabled). thanks simba --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6647&messageID=19390#19390 From Jason.He at resilience.com Thu Mar 1 01:34:13 2007 From: Jason.He at resilience.com (Jason He) Date: Wed, 28 Feb 2007 22:34:13 -0800 Subject: [Wtr-general] Can Watir be paused & resumed manually In-Reply-To: <62491869.1172669277863.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: As you mentioned, the "gets" will block the whole threads, maybe it need to be replaced by other key press input method. Is there an equivalent method in Ruby like trap method in Perl? Regards, Jason -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of John Lolis Sent: 2007?2?28? 21:27 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Can Watir be paused & resumed manually You are looking for some kind of interactive script. I can't imagine its too hard to do, but I don't have much time to mess around with it. Heres a fun little script i put together to test out an idea. Maybe it will spark some ideas. (note: do not use this for anything, its just for fun. Also, 'gets' blocks all threads, so it doesn't even work right. Enjoy :) ) class Console_Test def run done = false while !done input_string = gets.chomp! if input_string == 'wait' puts '*sleeping*' sleep 5 puts '*awake*' end if input_string == 'done' done = true puts '*done*' end end end end class Testing def run done = false i = 1 while !done puts 'Current: ' + i.to_s sleep 1 i += 1 if i > 10 done = true end end end end test = Testing.new() console = Console_Test.new() threads = [] threads << Thread.new{ console.run() } threads << Thread.new{ test.run() } threads.each {|t| t.join } --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6704&messageID=19346#19346 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From forum-watir-users at openqa.org Thu Mar 1 02:06:51 2007 From: forum-watir-users at openqa.org (vijay) Date: Thu, 01 Mar 2007 01:06:51 CST Subject: [Wtr-general] A small doubt in Ruby Message-ID: <43692692.1172732841880.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello people, Recently, when I was executing a simple Watir script, I noticed a small difference in the behaviour of Ruby. The code is: a = 'maloy' b = a puts a puts b a.chop! puts a puts b The output that I expected was: maloy # value of a maloy # value of b malo # value of chopped 'a' maloy # value of original 'b ' But the output given by Ruby was: maloy # value of a maloy # value of b malo # value of chopped 'a' malo # value of chopped 'b ' Is the output given out by Ruby correct? Why should Ruby chop the value of the variable 'b' when it was not asked to do that? (It was asked to chop the value of the variable 'a' only). Thanks for your time, Vaidyalingam. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6739&messageID=19392#19392 From crasch at gmail.com Thu Mar 1 02:42:24 2007 From: crasch at gmail.com (Christopher Rasch) Date: Wed, 28 Feb 2007 23:42:24 -0800 Subject: [Wtr-general] Installing FireWatir on Intel Mac OS X Tiger (Intel) In-Reply-To: References: <45E35D4A.600@gmail.com> Message-ID: <45E683E0.1040806@gmail.com> Angrez Singh wrote: > Hi Christopher, > > I appreciate your efforts to test FireWatir on Mac. > I am still not able to get why it is not working, if you are able to > connect > to JSSh? > > Do you get any errors on JavaScript console of Firefox because as per > testing with Dave Hoover the xpi was not getting installed properly on > Firefox 2.x because its an Firefox 1.5.x xpi. Also some files are > missing in > the xpi that you installed (jssh.jar) file is missing some files? Could you > try the other version of XPI file i.e.: > > http://people.mozilla.org/~davel/jssh/jssh-20060621-Darwin.xpi > > > this file contains the correct jssh.jar file. > > Let me know how it goes? But once you are connected to jssh it should work. > > Can you just manually try sending some javascript commands on the jssh > shell > to which you are connected? > > Regards, > Hi Angrez, Thanks for the response! I'll try the other jssh xpi file, and try to send some jssh commands manually. Chris From Jason.He at resilience.com Thu Mar 1 02:56:45 2007 From: Jason.He at resilience.com (Jason He) Date: Wed, 28 Feb 2007 23:56:45 -0800 Subject: [Wtr-general] How to execute other scipts called by Watir/Ruby In-Reply-To: <54616864.1172719751327.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Dear all, Because it seems that there is no available method in watir so far to clear the popup security alert, I intend to use a workaround method such as call other script to clear it. Is anybody known how to invoke other script via Watir/Ruby, for example to invoke AutoHotKey script? Regards, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070228/fb491d00/attachment.html From zeljko.filipin at gmail.com Thu Mar 1 05:04:20 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 1 Mar 2007 11:04:20 +0100 Subject: [Wtr-general] A small doubt in Ruby In-Reply-To: <43692692.1172732841880.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <43692692.1172732841880.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: I think this happens because both a and b point to string "maloy". You expected that a and b will each have it's own string. Use b = a.dup instead of b = a and it should work. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070301/b4e0b32b/attachment.html From sw_latha at yahoo.com Thu Mar 1 05:04:00 2007 From: sw_latha at yahoo.com (swarna latha) Date: Thu, 1 Mar 2007 02:04:00 -0800 (PST) Subject: [Wtr-general] A doubt Message-ID: <868728.95468.qm@web56215.mail.re3.yahoo.com> Hi, From the View ->Source html of a web page, I want to extract the text between 2 strings say ?Time? ************ ?millisec?. i.e the content between the words ?Time? and ?millisec?. Is it possible using Watir.This text ? Time millisec? is displayed in aline jus before the /body tag of the html.(no specific name or tag for this info) Any help is much appreciated as I am a first time user of Watir. Thanks, Swarna. My email id: sw_latha at yahoo.com ____________________________________________________________________________________ Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070301/37262758/attachment.html From zeljko.filipin at gmail.com Thu Mar 1 06:00:17 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 1 Mar 2007 12:00:17 +0100 Subject: [Wtr-general] A doubt In-Reply-To: <868728.95468.qm@web56215.mail.re3.yahoo.com> References: <868728.95468.qm@web56215.mail.re3.yahoo.com> Message-ID: You can do it using regular expressions. ie.text will get all text in browser. I guess there is a space after "Time" and before "milisec" and that there is some text before and after it. ie.text => "text Time 1234 millisec text" Put "Time 1234 millisec" in variable ms. "." means any character, "*" means as many characters as there is. ms = ie.text.match /Time .* millisec/ ms = ms.to_s => "Time 1234 millisec" Delete "Time " and " millisec" from ms. ms = ms.sub("Time ", "") => "1234 millisec" ms = ms.sub(" millisec", "") => "1234" Now ms variable contains only number of milliseconds. ms => "1234" For more information see http://www.regular-expressions.info/ruby.html and http://www.rubycentral.com/book/tut_stdtypes.html (section Regular Expressions) There is surely a quicker way to do it, but this also works. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070301/8e553b3a/attachment.html From forum-watir-users at openqa.org Thu Mar 1 11:32:51 2007 From: forum-watir-users at openqa.org (Jason) Date: Thu, 01 Mar 2007 10:32:51 CST Subject: [Wtr-general] Test Data Cleanup/Reset Database in a .bat In-Reply-To: <72799cd70702261752p691f699eye04b13d1b0f766f9@mail.gmail.com> Message-ID: <35390559.1172766801518.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Here was my solution, in case others have this problem. I used setup and the sqlcmd.exe utility to call the SQL statement from within the batch file. So, it looks like this: def setup system("sqlcmd.exe -i C:\\myproject\\CleanDatabase.sql -e -b -S x -U x -P x") end Cheers, Jason --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6700&messageID=19431#19431 From forum-watir-users at openqa.org Thu Mar 1 13:44:58 2007 From: forum-watir-users at openqa.org (Lauren) Date: Thu, 01 Mar 2007 12:44:58 CST Subject: [Wtr-general] Problems accessing modal_dialog from ruby v. 1.8.5 In-Reply-To: <51839786.1172706321254.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <51758300.1172774731977.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Can someone please answer whether I can expect 'modal_dialog' to work with ruby version 1.8.5? Or does it ONLY work with ruby 1.8.2? Thanks --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6733&messageID=19443#19443 From paul.rogers at shaw.ca Thu Mar 1 14:15:34 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 01 Mar 2007 12:15:34 -0700 Subject: [Wtr-general] Problems accessing modal_dialog from ruby v. 1.8.5 References: <51758300.1172774731977.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <068001c75c35$fcdd92b0$6400a8c0@laptop> I dont wish to sound sarcastic, but this took me about 2 minutes to find >From http://forums.openqa.org/thread.jspa?messageID=17202 " The modal_dialog code is not supported with Ruby 1.8.4. Or more specifically, the win32ole changes that we made to support modal dialogs only work with Ruby 1.8.2. Bret " Paul ----- Original Message ----- From: "Lauren" To: Sent: Thursday, March 01, 2007 11:44 AM Subject: Re: [Wtr-general] Problems accessing modal_dialog from ruby v. 1.8.5 > Can someone please answer whether I can expect 'modal_dialog' to work with > ruby version 1.8.5? Or does it ONLY work with ruby 1.8.2? Thanks > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6733&messageID=19443#19443 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From Mark_Cain at RL.gov Thu Mar 1 14:32:30 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Thu, 1 Mar 2007 11:32:30 -0800 Subject: [Wtr-general] Problems accessing modal_dialog from ruby v. 1.8.5 In-Reply-To: <068001c75c35$fcdd92b0$6400a8c0@laptop> References: <51758300.1172774731977.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <068001c75c35$fcdd92b0$6400a8c0@laptop> Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A3712@EX01-2.rl.gov> Do we have a timeline on when this will work in 1.8.5? Is anyone working on this? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, March 01, 2007 11:16 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Problems accessing modal_dialog from ruby v. 1.8.5 I dont wish to sound sarcastic, but this took me about 2 minutes to find >From http://forums.openqa.org/thread.jspa?messageID=17202 " The modal_dialog code is not supported with Ruby 1.8.4. Or more specifically, the win32ole changes that we made to support modal dialogs only work with Ruby 1.8.2. Bret " Paul ----- Original Message ----- From: "Lauren" To: Sent: Thursday, March 01, 2007 11:44 AM Subject: Re: [Wtr-general] Problems accessing modal_dialog from ruby v. 1.8.5 > Can someone please answer whether I can expect 'modal_dialog' to work with > ruby version 1.8.5? Or does it ONLY work with ruby 1.8.2? Thanks > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6733&messageID=19443#19443 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From areed at relocationcentral.com Thu Mar 1 15:04:18 2007 From: areed at relocationcentral.com (Adam Reed) Date: Thu, 1 Mar 2007 14:04:18 -0600 Subject: [Wtr-general] Using Ruby for email notification? References: <51758300.1172774731977.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <068001c75c35$fcdd92b0$6400a8c0@laptop> Message-ID: <36B5DBA88E027F47812ED877C6A978D803500B@rc-mail.relocationcentral.com> I have quite a few regression tests built in Ruby/Watir now, and I'd like to schedule them to run overnight. I have also built a logging function which is great, but I'd like to try to have the automated tests e-mail me as well as write to the text logs. That leads me to ask you guys -- has anyone used Ruby for e-mail? Our company has an exchange server with smtp enabled so I can easily connect to it via telnet, but I'm not sure how to achieve this in Ruby. I've read the about.com article (http://ruby.about.com/od/tutorials/ss/ruby_email.htm), but there is not a whole lot of explanation for a few of the parameters, nor a lot of online discussion about it (or at least Google can't find it). The code they list is: ------------------------------------------------------------------------ - require net/smtp myMessage = < To: Donald Duck Subject: Contract Negotiations Don't let the big guy bully you. END_OF_MESSAGE Net::SMTP.start('localhost', 25, 'localhost.localdomain', 'mickey', 'cheese', :login) do |smtp| smtp.send_message myMessage, 'bigcheese.disney.com' end ------------------------------------------------------------------------ - When I try this with my company server information (which has been verified), I get the following error: c:/ruby/lib/ruby/1.8/net/smtp.rb:536:in `send0': mail destination not given (ArgumentError) from c:/ruby/lib/ruby/1.8/net/smtp.rb:472:in `send_message' from emailtest.rb:12 from c:/ruby/lib/ruby/1.8/net/smtp.rb:379:in `start' from c:/ruby/lib/ruby/1.8/net/smtp.rb:316:in `start' from emailtest.rb:11 Thanks, Adam From areed at relocationcentral.com Thu Mar 1 15:27:32 2007 From: areed at relocationcentral.com (Adam Reed) Date: Thu, 1 Mar 2007 14:27:32 -0600 Subject: [Wtr-general] Using Ruby for email notification? References: <51758300.1172774731977.JavaMail.oqa-j2ee@openqa01.managed.contegix.com><068001c75c35$fcdd92b0$6400a8c0@laptop> <36B5DBA88E027F47812ED877C6A978D803500B@rc-mail.relocationcentral.com> Message-ID: <36B5DBA88E027F47812ED877C6A978D803500C@rc-mail.relocationcentral.com> Seems pretty typical, all I have to do is ask for help and then all of a sudden something I've been digging for for a month falls into my lap. For anyone wondering: from_addr = "log-voy... at somewhere.net" to_addr = "m... at somewhere.net" email_text = <<"END_EMAIL" To: "Me" <#{to_addr}> From: #{from_addr} Subject: That thar logfile turned up somethin' Hi, #{to_addr}, Here's the email about the logfile thing. END_EMAIL # now the sendmail part... IO.popen("/usr/sbin/sendmail #{to_addr}", "w") do |sendmail| sendmail.print email_text end # That's it... Or, using SMTP directly: require 'net/smtp' Net::SMTP.start("your-isp-smtp-server.com") do |smtp| smtp.sendmail(email_text, from_addr, to_addr) end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Adam Reed Sent: Thursday, March 01, 2007 2:04 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Using Ruby for email notification? I have quite a few regression tests built in Ruby/Watir now, and I'd like to schedule them to run overnight. I have also built a logging function which is great, but I'd like to try to have the automated tests e-mail me as well as write to the text logs. That leads me to ask you guys -- has anyone used Ruby for e-mail? Our company has an exchange server with smtp enabled so I can easily connect to it via telnet, but I'm not sure how to achieve this in Ruby. I've read the about.com article (http://ruby.about.com/od/tutorials/ss/ruby_email.htm), but there is not a whole lot of explanation for a few of the parameters, nor a lot of online discussion about it (or at least Google can't find it). The code they list is: ------------------------------------------------------------------------ - require net/smtp myMessage = < To: Donald Duck Subject: Contract Negotiations Don't let the big guy bully you. END_OF_MESSAGE Net::SMTP.start('localhost', 25, 'localhost.localdomain', 'mickey', 'cheese', :login) do |smtp| smtp.send_message myMessage, 'bigcheese.disney.com' end ------------------------------------------------------------------------ - When I try this with my company server information (which has been verified), I get the following error: c:/ruby/lib/ruby/1.8/net/smtp.rb:536:in `send0': mail destination not given (ArgumentError) from c:/ruby/lib/ruby/1.8/net/smtp.rb:472:in `send_message' from emailtest.rb:12 from c:/ruby/lib/ruby/1.8/net/smtp.rb:379:in `start' from c:/ruby/lib/ruby/1.8/net/smtp.rb:316:in `start' from emailtest.rb:11 Thanks, Adam _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From forum-watir-users at openqa.org Thu Mar 1 15:46:19 2007 From: forum-watir-users at openqa.org (Lauren) Date: Thu, 01 Mar 2007 14:46:19 CST Subject: [Wtr-general] Problems accessing modal_dialog from ruby v. 1.8.5 In-Reply-To: <068001c75c35$fcdd92b0$6400a8c0@laptop> Message-ID: <41394278.1172782081811.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Paul, Thanks for confirming. It was actually that EXACT email that I was referring to. I just wasn't sure I had read it right. It's hard to believe that a feature would be added in release 1.8.2 and not work for future releases. I'll stop trying to access this modal_dialog box now (and beating my head against the desk)...instead I'll go track down my sys admin and have them uninstall 1.8.5 and reinstall ruby 1.8.2 for me. This will be the third time I've had to make this request in the last week. It's becoming embarrassing. Soon they'll be asking why I'm using this language. *sigh*. But seriously, thanks for confirming. Lauren I dont wish to sound sarcastic, but this took me about 2 minutes to find >From http://forums.openqa.org/thread.jspa?messageID=17202 " The modal_dialog code is not supported with Ruby 1.8.4. Or more specifically, the win32ole changes that we made to support modal dialogs only work with Ruby 1.8.2. Bret " Paul ----- Original Message ----- From: "Lauren" To: Sent: Thursday, March 01, 2007 11:44 AM Subject: Re: [Wtr-general] Problems accessing modal_dialog from ruby v. 1.8.5 > Can someone please answer whether I can expect 'modal_dialog' to work with > ruby version 1.8.5? Or does it ONLY work with ruby 1.8.2? Thanks --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6733&messageID=19451#19451 From paul.rogers at shaw.ca Thu Mar 1 16:10:31 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 01 Mar 2007 14:10:31 -0700 Subject: [Wtr-general] Problems accessing modal_dialog from ruby v. 1.8.5 References: <41394278.1172782081811.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <06a101c75c46$0bc9d030$6400a8c0@laptop> no problem. Can you get your sys admin to give you admin priviliges on your machine. THis will make many things easier for you. I think the issue with the versions is that the ole library needs to be recompiled with that version of ruby. ----- Original Message ----- From: "Lauren" To: Sent: Thursday, March 01, 2007 1:46 PM Subject: Re: [Wtr-general] Problems accessing modal_dialog from ruby v. 1.8.5 > Paul, > > Thanks for confirming. It was actually that EXACT email that I was > referring to. I just wasn't sure I had read it right. It's hard to believe > that a feature would be added in release 1.8.2 and not work for future > releases. > > I'll stop trying to access this modal_dialog box now (and beating my head > against the desk)...instead I'll go track down my sys admin and have them > uninstall 1.8.5 and reinstall ruby 1.8.2 for me. This will be the third > time I've had to make this request in the last week. It's becoming > embarrassing. Soon they'll be asking why I'm using this language. *sigh*. > > But seriously, thanks for confirming. > > Lauren > > > I dont wish to sound sarcastic, but this took me about 2 minutes to find > >>From http://forums.openqa.org/thread.jspa?messageID=17202 > > " The modal_dialog code is not supported with Ruby 1.8.4. Or more > specifically, the win32ole changes that we made to support modal dialogs > only work with Ruby 1.8.2. > > Bret " > > > Paul > > > ----- Original Message ----- > From: "Lauren" > To: > Sent: Thursday, March 01, 2007 11:44 AM > Subject: Re: [Wtr-general] Problems accessing modal_dialog from ruby v. > 1.8.5 > > >> Can someone please answer whether I can expect 'modal_dialog' to work >> with >> ruby version 1.8.5? Or does it ONLY work with ruby 1.8.2? Thanks > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6733&messageID=19451#19451 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Thu Mar 1 16:11:45 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 01 Mar 2007 14:11:45 -0700 Subject: [Wtr-general] Using Ruby for email notification? References: <51758300.1172774731977.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <068001c75c35$fcdd92b0$6400a8c0@laptop> <36B5DBA88E027F47812ED877C6A978D803500B@rc-mail.relocationcentral.com> <36B5DBA88E027F47812ED877C6A978D803500C@rc-mail.relocationcentral.com> Message-ID: <06a601c75c46$37cfcd60$6400a8c0@laptop> you can also use the gmailer library. This is often the best thing to use, as you now dont need to know about the exchange settings, and frequently the IT group will prevent desktop PCs from relaying off excahnage, as its a bad security hole Paul ----- Original Message ----- From: "Adam Reed" To: Sent: Thursday, March 01, 2007 1:27 PM Subject: Re: [Wtr-general] Using Ruby for email notification? > Seems pretty typical, all I have to do is ask for help and then all of a > sudden something I've been digging for for a month falls into my lap. > For anyone wondering: > > from_addr = "log-voy... at somewhere.net" > to_addr = "m... at somewhere.net" > > email_text = <<"END_EMAIL" > To: "Me" <#{to_addr}> > From: #{from_addr} > Subject: That thar logfile turned up somethin' > > Hi, #{to_addr}, > > Here's the email about the logfile thing. > END_EMAIL > > # now the sendmail part... > > IO.popen("/usr/sbin/sendmail #{to_addr}", "w") do |sendmail| > sendmail.print email_text > end > > # That's it... Or, using SMTP directly: > > require 'net/smtp' > > Net::SMTP.start("your-isp-smtp-server.com") do |smtp| > smtp.sendmail(email_text, from_addr, to_addr) > end > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Adam Reed > Sent: Thursday, March 01, 2007 2:04 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Using Ruby for email notification? > > I have quite a few regression tests built in Ruby/Watir now, and I'd > like to schedule them to run overnight. I have also built a logging > function which is great, but I'd like to try to have the automated tests > e-mail me as well as write to the text logs. That leads me to ask you > guys -- has anyone used Ruby for e-mail? > > Our company has an exchange server with smtp enabled so I can easily > connect to it via telnet, but I'm not sure how to achieve this in Ruby. > I've read the about.com article > (http://ruby.about.com/od/tutorials/ss/ruby_email.htm), but there is not > a whole lot of explanation for a few of the parameters, nor a lot of > online discussion about it (or at least Google can't find it). > > The code they list is: > ------------------------------------------------------------------------ > - > require net/smtp > > myMessage = < From: Mickey Mouse > To: Donald Duck > Subject: Contract Negotiations > > Don't let the big guy bully you. > END_OF_MESSAGE > > Net::SMTP.start('localhost', 25, 'localhost.localdomain', 'mickey', > 'cheese', :login) do |smtp| > smtp.send_message myMessage, 'bigcheese.disney.com' > end > ------------------------------------------------------------------------ > - > > When I try this with my company server information (which has been > verified), I get the following error: > > c:/ruby/lib/ruby/1.8/net/smtp.rb:536:in `send0': mail destination not > given (ArgumentError) > from c:/ruby/lib/ruby/1.8/net/smtp.rb:472:in `send_message' > from emailtest.rb:12 > from c:/ruby/lib/ruby/1.8/net/smtp.rb:379:in `start' > from c:/ruby/lib/ruby/1.8/net/smtp.rb:316:in `start' > from emailtest.rb:11 > > Thanks, > Adam > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From Jason.He at resilience.com Thu Mar 1 21:22:02 2007 From: Jason.He at resilience.com (Jason He) Date: Thu, 1 Mar 2007 18:22:02 -0800 Subject: [Wtr-general] How to get the localhost IP in Warit/Ruby In-Reply-To: <49508224.1172683944916.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi all, Is there any available method to fetch the localhost's IP address? Regards, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070301/e9573334/attachment.html From christopher.mcmahon at gmail.com Thu Mar 1 22:03:53 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 1 Mar 2007 20:03:53 -0700 Subject: [Wtr-general] How to get the localhost IP in Warit/Ruby In-Reply-To: References: <49508224.1172683944916.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70703011903v5baee855s35e47790e7aab072@mail.gmail.com> On 3/1/07, Jason He wrote: > Hi all, > > Is there any available method to fetch the localhost's IP address? irb(main):001:0> require 'socket' => true irb(main):002:0> ip_address = IPSocket.getaddress(Socket.gethostname) => "192.168.2.106" irb(main):003:0> From Jason.He at resilience.com Fri Mar 2 00:26:23 2007 From: Jason.He at resilience.com (Jason He) Date: Thu, 1 Mar 2007 21:26:23 -0800 Subject: [Wtr-general] How to get the localhost IP in Warit/Ruby In-Reply-To: <72799cd70703011903v5baee855s35e47790e7aab072@mail.gmail.com> Message-ID: Yeah, it works, Thanks very much. Jason -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 2007?3?2? 11:04 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to get the localhost IP in Warit/Ruby On 3/1/07, Jason He wrote: > Hi all, > > Is there any available method to fetch the localhost's IP address? irb(main):001:0> require 'socket' => true irb(main):002:0> ip_address = IPSocket.getaddress(Socket.gethostname) => "192.168.2.106" irb(main):003:0> _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From forum-watir-users at openqa.org Fri Mar 2 01:40:01 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Fri, 02 Mar 2007 00:40:01 CST Subject: [Wtr-general] Executing all scripts at a time In-Reply-To: Message-ID: <61559010.1172817632005.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I am able to run all the tests by using require 'test1.rb' require 'test2.rb' require 'test3.rb' etc., but when i start the test it is opening 3 windows if there are 3 tests to run, i have nearly 15 tests then it opens 15 windows at a time and the test is running only in the last window. So How to solve this problem?? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6664&messageID=19466#19466 From Jason.He at resilience.com Fri Mar 2 04:09:59 2007 From: Jason.He at resilience.com (Jason He) Date: Fri, 2 Mar 2007 01:09:59 -0800 Subject: [Wtr-general] Executing all scripts at a time In-Reply-To: <61559010.1172817632005.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: I use load method, such as, Load 'test1.rb' Load 'test2.rb' Load 'test3.rb', etc These test cases could run one after one and there is only one window brought up, although the running sequence is not according to the line sequence written in the script. One thing maybe need to pay attention to is that, use global variable $ie to create the IE.new instance and use this variable in all test cases, rather than use a local variable to create that for each test case. Regards, Jason -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Naga Harish Kanegolla Sent: 2007?3?2? 14:40 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Executing all scripts at a time Hi, I am able to run all the tests by using require 'test1.rb' require 'test2.rb' require 'test3.rb' etc., but when i start the test it is opening 3 windows if there are 3 tests to run, i have nearly 15 tests then it opens 15 windows at a time and the test is running only in the last window. So How to solve this problem?? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6664&messageID=19466#19466 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From forum-watir-users at openqa.org Fri Mar 2 06:41:08 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Fri, 02 Mar 2007 05:41:08 CST Subject: [Wtr-general] Executing all scripts at a time In-Reply-To: Message-ID: <37410986.1172835698963.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, Its working, The problem is I gave $ie=Watir::IE.new in every file, so that is the reason i am getting all the files. Now its working with both require and load, Thank you, Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6664&messageID=19473#19473 From sw_latha at yahoo.com Fri Mar 2 06:44:55 2007 From: sw_latha at yahoo.com (swarna latha) Date: Fri, 2 Mar 2007 03:44:55 -0800 (PST) Subject: [Wtr-general] How to Pass values from Excel into variables in Watir ? Message-ID: <694228.75859.qm@web56203.mail.re3.yahoo.com> How can I achieve this? For example i have a list of data say urls entered in an excel sheet, that need to be passed into a variable in a method or function of watir .That is to get the values from an excel spreadsheet into the variable ? Any help or pointers is very much appreciated. Thanks , Swarna. ____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070302/82dae5c2/attachment.html From angrez at gmail.com Fri Mar 2 07:31:23 2007 From: angrez at gmail.com (Angrez Singh) Date: Fri, 2 Mar 2007 18:01:23 +0530 Subject: [Wtr-general] How to Pass values from Excel into variables in Watir ? In-Reply-To: <694228.75859.qm@web56203.mail.re3.yahoo.com> References: <694228.75859.qm@web56203.mail.re3.yahoo.com> Message-ID: Hi, This question has been asked couple of times in this list. You can search the archives for the answers/code snippets etc. Bret: I think we should add this to FAQ page. Shall I update the FAQ page? Regards, Angrez On 3/2/07, swarna latha wrote: > > How can I achieve this? > For example i have a list of data say urls entered in an excel sheet, that > need to be passed into a variable in a method or function of watir .That is > to get the values from an excel spreadsheet into the variable ? > > Any help or pointers is very much appreciated. > > Thanks , > Swarna. > > > > ------------------------------ > Don't pick lemons. > See all the new 2007 carsat Yahoo! > Autos. > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070302/72f29bd8/attachment.html From zeljko.filipin at gmail.com Fri Mar 2 07:39:25 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 2 Mar 2007 13:39:25 +0100 Subject: [Wtr-general] How to Pass values from Excel into variables in Watir ? In-Reply-To: <694228.75859.qm@web56203.mail.re3.yahoo.com> References: <694228.75859.qm@web56203.mail.re3.yahoo.com> Message-ID: Take a look at http://wiki.rubygarden.org/ruby/page/show/ScriptingExcel That page seems to be off line, but there is Google cache page http://www.google.com/search?q=cache:tEaxL9sKYdQJ:wiki.rubygarden.org/ruby/page/show/ScriptingExcel+ScriptingExcel&hl=en&client=firefox-a&strip=1 -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070302/39bc7716/attachment.html From forum-watir-users at openqa.org Fri Mar 2 09:44:55 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Fri, 02 Mar 2007 08:44:55 CST Subject: [Wtr-general] Converting into LOG Message-ID: <51111525.1172846725899.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi all, Right now I am able to test all my test cases, and i am getting the out put lines in the console. Is there any possibility to get the whole out put and the test pass or fail result etc into a "LOG"file so that it can be sent as an email. I tried for the reports in the page http://rubyforge.org/projects/test-report/ but we need to have like a log file, Please help me if there is any possibility. Thanks a lot, Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6765&messageID=19486#19486 From forum-watir-users at openqa.org Fri Mar 2 11:07:01 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Fri, 02 Mar 2007 10:07:01 CST Subject: [Wtr-general] Selecting an 'accented character' from a list Message-ID: <55066101.1172851651269.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Looking for a bit of help here. I have a select list that has the following value 'Nome do servi?o'. When I do select_list(whatever).text i get back 'Nome do servi\347o' if i look in the source of the html i get 'Nome do serviço' I also found code to convert 'Nome do servi?o' to 'Nome do serviço' (but thats not what ruby sees) so... I need a way to convert 'Nome do servi?o' to 'Nome do servi\347o' (i think...) # Code to convert from 'Nome do servi?o' to 'Nome do serviço' # stolen from somwhere def entities( str ) converted = [] str.split(//).collect { |c| converted << ( c[0] > 127 ? "&##{c[0]};" : c ) } converted.join('') end --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6766&messageID=19489#19489 From charley.baker at gmail.com Fri Mar 2 11:40:01 2007 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 2 Mar 2007 09:40:01 -0700 Subject: [Wtr-general] How to Pass values from Excel into variables in Watir ? In-Reply-To: References: <694228.75859.qm@web56203.mail.re3.yahoo.com> Message-ID: Hey Angrez, I'd be more than happy if you were to add this to the FAQ. -Charley On 3/2/07, Angrez Singh wrote: > > Hi, > > This question has been asked couple of times in this list. You can search > the archives for the answers/code snippets etc. > > Bret: > I think we should add this to FAQ page. Shall I update the FAQ page? > > Regards, > Angrez > > On 3/2/07, swarna latha wrote: > > > How can I achieve this? > > For example i have a list of data say urls entered in an excel > > sheet, that need to be passed into a variable in a method or function of > > watir .That is to get the values from an excel spreadsheet into the variable > > ? > > > > Any help or pointers is very much appreciated. > > > > Thanks , > > Swarna. > > > > > > > > ------------------------------ > > Don't pick lemons. > > See all the new 2007 carsat Yahoo! > > Autos. > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070302/20c012a8/attachment.html From tester.paul at gmail.com Fri Mar 2 12:13:17 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 2 Mar 2007 12:13:17 -0500 Subject: [Wtr-general] Selecting an 'accented character' from a list In-Reply-To: <55066101.1172851651269.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <55066101.1172851651269.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37c405480703020913o62215acatceb3ae9604271aaf@mail.gmail.com> Hi John, this may or may not be useful but when I work with accented items like these, I treat them like a black box. That is, I don't look into the box to see how Ruby translates them .. which may or may not be how Ruby really sees them. In your select_list, can you refer to that "service name" item by index instead of by text? Not being a real programmer, I don't know if how I do things is the right way or not, but I make *a lot* of use of arrays. When I need to navigate between names with accented characters, I drop all the contents into arrays and then navigate by id and index numbers instead. Hashes are really good to me sometimes. I spent some time months ago doing the same kinds of code magic translations that you are proposing below but I gave up in frustration after a few days. In my case, it looked like what Ruby showed me and what it really saw were not the same thing, so I found it was best not to look at all. Again, this might not help you, but it's how I managed to get around a similar problem. I don't know what your scripts do. My scripts just kind of randomly choose whatever data they need on the fly so no two runs are ever the same. I think the only data that I know my scripts reuse are the user ID and password to log into the system. Everything else sits in randomly-created or selected variables and arrays. I let Ruby work with whatever data it finds. I know. It's weird. But that's how I test, so I've programmed my scripts to work the same way I do. ;-) Best of luck! Cheers. Paul C. On 02/03/07, John Lolis wrote: > > Looking for a bit of help here. > > I have a select list that has the following value 'Nome do servi?o'. > > When I do select_list(whatever).text i get back 'Nome do servi\347o' > > if i look in the source of the html i get 'Nome do serviço' > > I also found code to convert 'Nome do servi?o' to 'Nome do serviço' > (but thats not what ruby sees) > > so... > > I need a way to convert 'Nome do servi?o' to 'Nome do servi\347o' (i > think...) > > # Code to convert from 'Nome do servi?o' to 'Nome do serviço' > # stolen from somwhere > > def entities( str ) > converted = [] > str.split(//).collect { |c| converted << ( c[0] > 127 ? "&##{c[0]};" : c > ) } > converted.join('') > end > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070302/36ef9834/attachment.html From charley.baker at gmail.com Fri Mar 2 12:13:47 2007 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 2 Mar 2007 10:13:47 -0700 Subject: [Wtr-general] Converting into LOG In-Reply-To: <51111525.1172846725899.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <51111525.1172846725899.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi Harish, You can use test-report or ci-reporter on rubyforge to output your results. My tests are hooked up through Cruise Control on a continuous integration server which picks up the reports, sends out email and can also display logs in the Cruise Control build artifacts on the ci box cc site. Test-report is no longer listed on rubyforge, it's successor is ci_reporter: http://rubyforge.org/forum/forum.php?forum_id=12202 Rather than roll your own solution you might want to look at CruiseControl, Bamboo, CruiseControl.rb: http://cruisecontrolrb.thoughtworks.com/documentation/index.html or other build projects. They support email, report gathering of xUnit style reports and custom build artifacts (i.e. a log file that you might want to generate during your test run.) Instead of logging to standard out, take a look at a logging library such as the one that comes with ruby: http://www.ruby-doc.org/core/classes/Logger.html or Log4r: http://log4r.sourceforge.net You should be able to easily configure a CI server to do what you want pretty easily. On the other hand if you still want to roll your own, then you can kick out logs, use test-report or ci-reporter for results, maybe timestamp them and mail them out as attachments using some of the email libraries that have been mentioned previously on the list. -Charley On 3/2/07, Naga Harish Kanegolla wrote: > > Hi all, > Right now I am able to test all my test cases, and i am getting the out > put lines in the console. Is there any possibility to get the whole out put > and the test pass or fail result etc into a "LOG"file so that it can be sent > as an email. > > I tried for the reports in the page > http://rubyforge.org/projects/test-report/ but we need to have like a log > file, Please help me if there is any possibility. Thanks a lot, > > Harish > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6765&messageID=19486#19486 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070302/e8a87514/attachment.html From areed at relocationcentral.com Fri Mar 2 13:44:09 2007 From: areed at relocationcentral.com (Adam Reed) Date: Fri, 2 Mar 2007 12:44:09 -0600 Subject: [Wtr-general] Converting into LOG References: <51111525.1172846725899.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36B5DBA88E027F47812ED877C6A978D803500D@rc-mail.relocationcentral.com> Thanks for the heads up on CruiseControl. I was happy with my current logging/notification, but this looks like a great alternative! ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Charley Baker Sent: Friday, March 02, 2007 11:14 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Converting into LOG Hi Harish, You can use test-report or ci-reporter on rubyforge to output your results. My tests are hooked up through Cruise Control on a continuous integration server which picks up the reports, sends out email and can also display logs in the Cruise Control build artifacts on the ci box cc site. Test-report is no longer listed on rubyforge, it's successor is ci_reporter: http://rubyforge.org/forum/forum.php?forum_id=12202 Rather than roll your own solution you might want to look at CruiseControl, Bamboo, CruiseControl.rb: http://cruisecontrolrb.thoughtworks.com/documentation/index.html or other build projects. They support email, report gathering of xUnit style reports and custom build artifacts ( i.e. a log file that you might want to generate during your test run.) Instead of logging to standard out, take a look at a logging library such as the one that comes with ruby: http://www.ruby-doc.org/core/classes/Logger.html or Log4r: http://log4r.sourceforge.net You should be able to easily configure a CI server to do what you want pretty easily. On the other hand if you still want to roll your own, then you can kick out logs, use test-report or ci-reporter for results, maybe timestamp them and mail them out as attachments using some of the email libraries that have been mentioned previously on the list. -Charley On 3/2/07, Naga Harish Kanegolla wrote: Hi all, Right now I am able to test all my test cases, and i am getting the out put lines in the console. Is there any possibility to get the whole out put and the test pass or fail result etc into a "LOG"file so that it can be sent as an email. I tried for the reports in the page http://rubyforge.org/projects/test-report/ but we need to have like a log file, Please help me if there is any possibility. Thanks a lot, Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6765&messageID=19486#19486 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070302/03882f4f/attachment-0001.html From David_Brown at mentor.com Fri Mar 2 18:47:54 2007 From: David_Brown at mentor.com (Brown, David) Date: Fri, 2 Mar 2007 15:47:54 -0800 Subject: [Wtr-general] Excel Interface Class In-Reply-To: Message-ID: <44B054F46C2E4E4996C27D92F9B825EE04BB43B9@SVR-ORW-EXC-07.mgc.mentorg.com> 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 From christopher.mcmahon at gmail.com Fri Mar 2 19:51:03 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 2 Mar 2007 17:51:03 -0700 Subject: [Wtr-general] Excel Interface Class In-Reply-To: <44B054F46C2E4E4996C27D92F9B825EE04BB43B9@SVR-ORW-EXC-07.mgc.mentorg.com> References: <44B054F46C2E4E4996C27D92F9B825EE04BB43B9@SVR-ORW-EXC-07.mgc.mentorg.com> Message-ID: <72799cd70703021651k6b27443r8b7d93a2d4b5b66f@mail.gmail.com> Bravo! -C On 3/2/07, Brown, David wrote: > 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 > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Sat Mar 3 01:51:06 2007 From: forum-watir-users at openqa.org (vijay) Date: Sat, 03 Mar 2007 00:51:06 CST Subject: [Wtr-general] A small doubt in Ruby In-Reply-To: Message-ID: <60581429.1172904696077.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank you Zeljko Filipin. I did not know about this '.dup' method before. That was an useful information. But is what Ruby doing (pointing two different variables to one string just because one variable's value was assigned to another in the previous step) correct? Shouldn't it consider the two variables as separate entities rather than one? Thanks, Vijay. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6739&messageID=19508#19508 From forum-watir-users at openqa.org Sat Mar 3 03:43:33 2007 From: forum-watir-users at openqa.org (vijay) Date: Sat, 03 Mar 2007 02:43:33 CST Subject: [Wtr-general] A small doubt in exception handling Message-ID: <48388959.1172911443968.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello people, Is there a way in Watir by which one can capture the line number of the code that threw an exception? We can get the actual message in the exception from the gloabl variable '$!'. Can we get the code's line number, which caused this exception, from some other global variable? For example, the following code: begin print z rescue puts "The exception message was " + $!.to_s end would output the message, 'The exception message was undefined local variable or method `z' for #'. But without the 'begin -- rescue class;, the code would have printed the error message, 'file_name.rb:117 (or some other line number): undefined local variable or method `z' for # (NameError) I want to use the 'begin -- rescue class' and still get the exact line number along with the error message. Is that possible? Thanks for your time, Vijay. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6777&messageID=19510#19510 From zeljko.filipin at gmail.com Sat Mar 3 10:32:46 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Sat, 3 Mar 2007 16:32:46 +0100 Subject: [Wtr-general] Selecting an 'accented character' from a list In-Reply-To: <55066101.1172851651269.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <55066101.1172851651269.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: I recently had a similar problem. I wanted to enter accented character to text field. Paul suggested that I put text with accented character to Excel file, then in Ruby script get that text from Excel file and put it in variable and use it in my script. And it worked. I do not have Excel at this machine so I can not try this out, but something like this should work. require 'watir' excel = WIN32OLE::new('excel.Application') workbook = excel.Workbooks.Open('C:\data.xls') # open file worksheet = workbook.Worksheets(1) # the first worksheet cell = worksheet.Range('a1')['Value'] # value of single cell at position A1 ie = Watir::IE.start("http://app.com/") # start IE and go to app.com ie.select_list(:index, 1).select(cell) # select value using text from Excel For more information see http://forums.openqa.org/message.jspa?messageID=19274 http://zeljkofilipin.com/2007/02/26/enter-non-english-character-in-text-field/ -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070303/3d3d97e4/attachment.html From zeljko.filipin at gmail.com Sat Mar 3 10:53:18 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Sat, 3 Mar 2007 16:53:18 +0100 Subject: [Wtr-general] A small doubt in Ruby In-Reply-To: <60581429.1172904696077.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <60581429.1172904696077.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Brian Marick wrote interesting article about variables and objects. "The key to avoiding misunderstanding is remembering that variables and objects are *different kinds of things*. The name of a thing is not the thing itself. This is best illustrated by pictures. I just drew some pictures that explain what was happening in your example. (I simplified to make it just one each, since the nested eaches don't have anything to do with the problem you had.) They are here: http://www.testing.com/review-copies/variables.pdf I'm rather pleased with them, plus I stayed up way too late to make them, so you all have to look at them." -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070303/0d215dca/attachment.html From forum-watir-users at openqa.org Sat Mar 3 11:17:33 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Sat, 03 Mar 2007 10:17:33 CST Subject: [Wtr-general] Selecting an 'accented character' from a list In-Reply-To: Message-ID: <56989478.1172938703473.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank you both for the information. I can enter the data fine (just need to use an editor that can handle special characters). The issue remains that in the html the value is "servi & # 2 3 1 ; o" (note i included spaces so you could see all the characters), watir stores the value as "Nome do servi\347o" I know how to convert to the first, but not the second :) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6766&messageID=19514#19514 From forum-watir-users at openqa.org Sat Mar 3 11:48:32 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Sat, 03 Mar 2007 10:48:32 CST Subject: [Wtr-general] Selecting an 'accented character' from a list In-Reply-To: <56989478.1172938703473.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <48877863.1172940542053.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> well heres some more code i found, which does the conversion. Now i just need to go the other way string = "Nome do servi\347o" puts string.gsub(/.$/u, '') regex = Regexp.new(/..../u) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6766&messageID=19515#19515 From charley.baker at gmail.com Sat Mar 3 11:51:45 2007 From: charley.baker at gmail.com (Charley Baker) Date: Sat, 3 Mar 2007 09:51:45 -0700 Subject: [Wtr-general] A small doubt in exception handling In-Reply-To: <48388959.1172911443968.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <48388959.1172911443968.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Sure, read the documentation for Ruby Exception class on rubydoc: http://www.ruby-doc.org/core/ The first listed method is backtrace which has filename:lineno def method_foo begin f = File.open('/some/non-existent/file') rescue puts "Message: " + $!.to_s $!.backtrace.each {|l| puts l.to_s} end end Message: No such file or directory - /some/non-existent/file test.rb:4:in `initialize' test.rb:4:in `open' test.rb:4:in `method_foo' test.rb:13 -Charley On 3/3/07, vijay wrote: > > Hello people, > > Is there a way in Watir by which one can capture the line number of the > code that threw an exception? We can get the actual message in the > exception from the gloabl variable '$!'. Can we get the code's line number, > which caused this exception, from some other global variable? > > For example, the following code: > > begin > print z > rescue > puts "The exception message was " + $!.to_s > end > > would output the message, > > 'The exception message was undefined local variable or method `z' for > #'. > > But without the 'begin -- rescue class;, the code would have printed the > error message, > > 'file_name.rb:117 (or some other line number): undefined local variable or > method `z' for # (NameError) > > I want to use the 'begin -- rescue class' and still get the exact line > number along with the error message. Is that possible? > > Thanks for your time, > Vijay. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6777&messageID=19510#19510 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070303/078e3809/attachment.html From angrez at gmail.com Mon Mar 5 00:20:31 2007 From: angrez at gmail.com (Angrez Singh) Date: Mon, 5 Mar 2007 10:50:31 +0530 Subject: [Wtr-general] How to Pass values from Excel into variables in Watir ? In-Reply-To: References: <694228.75859.qm@web56203.mail.re3.yahoo.com> Message-ID: Hi Charley, I'll add this to FAQ along with the code snippet. Regards, Angrez On 3/2/07, Charley Baker wrote: > > Hey Angrez, > > I'd be more than happy if you were to add this to the FAQ. > > -Charley > > On 3/2/07, Angrez Singh < angrez at gmail.com> wrote: > > > > Hi, > > > > This question has been asked couple of times in this list. You can > > search the archives for the answers/code snippets etc. > > > > Bret: > > I think we should add this to FAQ page. Shall I update the FAQ page? > > > > Regards, > > Angrez > > > > On 3/2/07, swarna latha < sw_latha at yahoo.com> wrote: > > > > > How can I achieve this? > > > For example i have a list of data say urls entered in an excel > > > sheet, that need to be passed into a variable in a method or function of > > > watir .That is to get the values from an excel spreadsheet into the variable > > > ? > > > > > > Any help or pointers is very much appreciated. > > > > > > Thanks , > > > Swarna. > > > > > > > > > > > > ------------------------------ > > > Don't pick lemons. > > > See all the new 2007 carsat Yahoo! > > > Autos. > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070305/119b7e9a/attachment-0001.html From forum-watir-users at openqa.org Mon Mar 5 01:59:12 2007 From: forum-watir-users at openqa.org (sathees) Date: Mon, 05 Mar 2007 00:59:12 CST Subject: [Wtr-general] Calling Definition again! In-Reply-To: <58890221.1172718167781.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <53024800.1173077982978.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> OR shall I put them in different class files? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6734&messageID=19524#19524 From forum-watir-users at openqa.org Mon Mar 5 02:51:51 2007 From: forum-watir-users at openqa.org (vijay) Date: Mon, 05 Mar 2007 01:51:51 CST Subject: [Wtr-general] A small doubt in Ruby In-Reply-To: Message-ID: <38498616.1173081141257.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank you Zeljko Filipin. That was an useful and an interesting '.pdf'. Thanks, Vijay. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6739&messageID=19525#19525 From forum-watir-users at openqa.org Mon Mar 5 02:53:11 2007 From: forum-watir-users at openqa.org (vijay) Date: Mon, 05 Mar 2007 01:53:11 CST Subject: [Wtr-general] A small doubt in exception handling In-Reply-To: Message-ID: <44482018.1173081222064.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank you so much Charley. Your answer was exactly what I had wanted. Thanks, Vijay. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6777&messageID=19526#19526 From Jason.He at resilience.com Mon Mar 5 03:21:54 2007 From: Jason.He at resilience.com (Jason He) Date: Mon, 5 Mar 2007 00:21:54 -0800 Subject: [Wtr-general] What is the funtion in Ruby equivalent as strrchr in C In-Reply-To: <53024800.1173077982978.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Dear all, I use "example_logger1.rb" and "test_logger1.rb" C:\watir1145\examples\logging to logging, but a problem is that the generated log file will under the same directory with test cases, I want put the generated logs into a separated directory. The code in the "example_logger1.rb" is that, logger = CoreLogger.new(File.join(File.dirname(__FILE__), "#{fileNamePrefix}_#{time}.txt") ,2, 1000000) Here the "File.dirname(__FILE__)" will return the directory who stores test cases. Now I want get the directory upper of the directory of "File.dirname(__FILE__)", is there a equivalent function or Regexp in Ruby/Watir as strrchr/substr in C to achieve this? Any hint or help is appreciated. Regards, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070305/0a3d0479/attachment.html From zeljko.filipin at gmail.com Mon Mar 5 05:54:47 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Mon, 5 Mar 2007 11:54:47 +0100 Subject: [Wtr-general] Calling Definition again! In-Reply-To: <53024800.1173077982978.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <58890221.1172718167781.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <53024800.1173077982978.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: I do not know why others did not reply, but I do know why I did not reply. Simply, I do not understand what do you want to do, and I do not understand what your code does. Try explaining your problem in more detail and try posting simpler code. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070305/b9da29b3/attachment.html From forum-watir-users at openqa.org Mon Mar 5 09:07:43 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Mon, 05 Mar 2007 08:07:43 CST Subject: [Wtr-general] Converting into LOG In-Reply-To: Message-ID: <55853809.1173103693132.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi Charley, I couldn't download that as its giving the error The page you were looking for doesn't exist. You may have mistyped the address or the page may have moved. Anyways thanks for the idea, and now i am able to log the output in to a log file and everything is working fine, But is there a way in watir to send a mail as an attachment of that log file ?? So that every body can access that, Thanks in Advance, Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6765&messageID=19539#19539 From zeljko.filipin at gmail.com Mon Mar 5 09:27:23 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Mon, 5 Mar 2007 15:27:23 +0100 Subject: [Wtr-general] Converting into LOG In-Reply-To: <55853809.1173103693132.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <55853809.1173103693132.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 3/5/07, Naga Harish Kanegolla wrote: > > But is there a way in watir to send a mail as an attachment of that log > file ? There are several Ruby libraries for sending e-mail. I tried the first two, but the other two could also be useful. http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/index.html http://i.loveruby.net/en/projects/tmail/ http://rubyforge.org/projects/rubymail/ http://rubyforge.org/projects/gmailutils/ -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070305/4faee55c/attachment.html From charley.baker at gmail.com Mon Mar 5 11:08:22 2007 From: charley.baker at gmail.com (Charley Baker) Date: Mon, 5 Mar 2007 09:08:22 -0700 Subject: [Wtr-general] What is the funtion in Ruby equivalent as strrchr in C In-Reply-To: References: <53024800.1173077982978.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: There are quite a few ways to do this, here's one using expand_path: f = File.dirname(__FILE__) # get your test directory puts File.expand_path("#{f}/..) # get the directory above your test directory -Charley On 3/5/07, Jason He wrote: > > Dear all, > > > > I use "example_logger1.rb" and "test_logger1.rb" > C:\watir1145\examples\logging to logging, but a problem is that the > generated log file will under the same directory with test cases, > > I want put the generated logs into a separated directory. > > > > The code in the "example_logger1.rb" is that, > > logger = CoreLogger.new(File.join(File.dirname(__FILE__), > "#{fileNamePrefix}_#{time}.txt") ,2, 1000000) > > Here the "File.dirname(__FILE__)" will return the directory who stores > test cases. > > Now I want get the directory upper of the directory of > "File.dirname(__FILE__)", is there a equivalent function or Regexp in > Ruby/Watir as strrchr/substr in C to achieve this? > > > > Any hint or help is appreciated. > > > > Regards, > > Jason > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070305/ec83f41d/attachment.html From christopher.mcmahon at gmail.com Mon Mar 5 13:13:33 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 5 Mar 2007 11:13:33 -0700 Subject: [Wtr-general] OT: The original problem. Re: A small doubt in Ruby Message-ID: <72799cd70703051013y2db790bdhde0ba513595e92bd@mail.gmail.com> On 3/5/07, vijay wrote: > Thank you Zeljko Filipin. That was an useful and an interesting '.pdf'. > > Thanks, > Vijay. For those interested in both history and the vagaries of OO programming, the original issue was a problem I stumbled across and mentioned on the list for people reviewing Brian's book. It's an interesting issue, and a good thing to be aware of, if you aren't already. For me, it comes up when I work with databases, since what comes back from Ruby ODBC is almost always an AoA, and that's where I got into trouble... ######################################### require 'test/unit' class TOY_CASE expected but was <[1, 2, 3]>. 1 tests, 1 assertions, 1 failures, 0 errors >Exit code: 1 I had to go to the comp.lang.ruby list for an answer. Even my local Ruby guru didn't see the problem immediately. Apparently inside an "each" loop you're only working on a copy of the item, not the item itself, so to_s isn't actually working on the real items in the array. To make this work, you have to use "map": aoa.each do |arr| arr.map! do |item| item = item.to_s end Jonathan Kohl mentions an opposite but similar weirdness: a = %w[a b c] b = a b = %w[x y z] p a => x y z p b => x y z when what was expected was this: p a => ["a", "b", "c"] From charley.baker at gmail.com Mon Mar 5 14:42:40 2007 From: charley.baker at gmail.com (Charley Baker) Date: Mon, 5 Mar 2007 12:42:40 -0700 Subject: [Wtr-general] OT: The original problem. Re: A small doubt in Ruby In-Reply-To: <72799cd70703051013y2db790bdhde0ba513595e92bd@mail.gmail.com> References: <72799cd70703051013y2db790bdhde0ba513595e92bd@mail.gmail.com> Message-ID: Strange, I tried the example from Jonathan Kohl, and it worked fine. The idea in Ruby is that variables hold references to objects not the objects themselves similar to Java. If you've worked in c/c++ this will make more sense, Ruby, Java and some other languages hide the ugliness of this under the covers. So when you create a variable and assign it to something, it's holding a pointer to the actual object. When you then assign that to another variable, you've now got two variables pointed to the same object in memory. a = 'foo' # create a variable named a that points to an object somewhere in memory b = a # now create b which will point to that same object in memory, in this case a string object puts a.object_id => object_id whatever puts b.object_id => the same object_id since they both point to the same object in memory Enumerating through a collection of some sort like an Array, makes it a bit more confusing. If you end up returning strings, for example, then those are new objects which won't then hold reference to the original objects in your collection. Hopefully that makes some sense. :) -Charley On 3/5/07, Chris McMahon wrote: > > On 3/5/07, vijay wrote: > > Thank you Zeljko Filipin. That was an useful and an interesting '.pdf'. > > > > Thanks, > > Vijay. > > For those interested in both history and the vagaries of OO > programming, the original issue was a problem I stumbled across and > mentioned on the list for people reviewing Brian's book. It's an > interesting issue, and a good thing to be aware of, if you aren't > already. For me, it comes up when I work with databases, since what > comes back from Ruby ODBC is almost always an AoA, and that's where I > got into trouble... > > ######################################### > require 'test/unit' > class TOY_CASE > def test_toy_test > > aoa = [[1,2,3],[4,5,6]] > > aoa.each do |arr| > arr.each do |item| > item = item.to_s > end > assert_equal(["1","2","3"],arr) > end > > end #def > end #class > ##################################### > 1) Failure: > test_toy_test(TOY_CASE) > [bar.rb:12:in `test_toy_test' > bar.rb:8:in `each' > bar.rb:8:in `test_toy_test']: > <["1", "2", "3"]> expected but was > <[1, 2, 3]>. > > 1 tests, 1 assertions, 1 failures, 0 errors > >Exit code: 1 > > I had to go to the comp.lang.ruby list for an answer. Even my local > Ruby guru didn't see the problem immediately. > > Apparently inside an "each" loop you're only working on a copy of the > item, not the item itself, so to_s isn't actually working on the real > items in the array. > > To make this work, you have to use "map": > > aoa.each do |arr| > arr.map! do |item| > item = item.to_s > end > > > Jonathan Kohl mentions an opposite but similar weirdness: > > a = %w[a b c] > b = a > b = %w[x y z] > p a > => > x y z > p b > => > x y z > when what was expected was this: > p a > => > ["a", "b", "c"] > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070305/901821ef/attachment.html From charley.baker at gmail.com Mon Mar 5 15:37:18 2007 From: charley.baker at gmail.com (Charley Baker) Date: Mon, 5 Mar 2007 13:37:18 -0700 Subject: [Wtr-general] Excel Interface Class In-Reply-To: <72799cd70703021651k6b27443r8b7d93a2d4b5b66f@mail.gmail.com> References: <44B054F46C2E4E4996C27D92F9B825EE04BB43B9@SVR-ORW-EXC-07.mgc.mentorg.com> <72799cd70703021651k6b27443r8b7d93a2d4b5b66f@mail.gmail.com> Message-ID: Nice work. I'd highly recommend that as people have examples or snippets, and perhaps fully working, unit tested libraries as you have, start to post them on our wiki in the user contribution area. -c On 3/2/07, Chris McMahon wrote: > > Bravo! > -C > > On 3/2/07, Brown, David wrote: > > 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 > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070305/367d3667/attachment.html From Carlos.Fernandez at usitc.gov Mon Mar 5 16:18:09 2007 From: Carlos.Fernandez at usitc.gov (Carlos.Fernandez at usitc.gov) Date: Mon, 5 Mar 2007 16:18:09 -0500 Subject: [Wtr-general] Js popup unit tests Message-ID: installed v1.4.1 via gems. Installed autoit v3. When I run the jscript_test.rb I receive IE errors stating that JavascriptClick.htm cannot be found. I cannot find that file under watir v1.4 in my gems dir. I downloaded it from svn and moved to the appropriate directory. Re-ran the tests. When IE would open a JS popup . . . Watir would not close it. I chaulked this up to the fact that a 1.5.x dev gem has been released for over a year. I installed the v1.5.1.1158 dev gem. When I ran the jscript_test.rb . . . Watir would not close the JS popups. I suspect that this is a local issue. Does anyone have any suggestions? Running xp pro sp2 IE 7 v7.0.5730.11 Ruby 1.8.2 Carlos From forum-watir-users at openqa.org Mon Mar 5 20:15:57 2007 From: forum-watir-users at openqa.org (sathees) Date: Mon, 05 Mar 2007 19:15:57 CST Subject: [Wtr-general] Calling Definition again! In-Reply-To: <41748950.1172718054890.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <57950257.1173143787896.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> why would some one start a new problem in my thread? anyone can answer my question please? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6734&messageID=19563#19563 From Jason.He at resilience.com Mon Mar 5 21:24:05 2007 From: Jason.He at resilience.com (Jason He) Date: Mon, 5 Mar 2007 18:24:05 -0800 Subject: [Wtr-general] What is the funtion in Ruby equivalent as strrchrin C In-Reply-To: Message-ID: Hi Charley, You gave a convenient way to achieve the goal. By the way, I guess a double quote is missing before the last bracket in the second line when using expand_path(). Thanks very much for your help. Jason ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Charley Baker Sent: 2007?3?6? 0:08 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] What is the funtion in Ruby equivalent as strrchrin C There are quite a few ways to do this, here's one using expand_path: f = File.dirname(__FILE__) # get your test directory puts File.expand_path("#{f}/..) # get the directory above your test directory -Charley On 3/5/07, Jason He < Jason.He at resilience.com> wrote: Dear all, I use "example_logger1.rb" and "test_logger1.rb" C:\watir1145\examples\logging to logging, but a problem is that the generated log file will under the same directory with test cases, I want put the generated logs into a separated directory. The code in the "example_logger1.rb" is that, logger = CoreLogger.new(File.join(File.dirname(__FILE__), "#{fileNamePrefix}_#{time}.txt") ,2, 1000000) Here the "File.dirname(__FILE__)" will return the directory who stores test cases. Now I want get the directory upper of the directory of "File.dirname(__FILE__)", is there a equivalent function or Regexp in Ruby/Watir as strrchr/substr in C to achieve this? Any hint or help is appreciated. Regards, Jason _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070305/ba430973/attachment-0001.html From Carlos.Fernandez at usitc.gov Mon Mar 5 21:50:43 2007 From: Carlos.Fernandez at usitc.gov (Carlos.Fernandez at usitc.gov) Date: Mon, 5 Mar 2007 21:50:43 -0500 Subject: [Wtr-general] Js popup unit tests References: Message-ID: --> I chaulked this up to the fact that a 1.5.x dev gem has been released for over a year. I just discovered the watir forum -- google sure is helpful ;) -- and realized the watir v1.4 does not support IE 7. However, I also had "hang-ups" when I ran the watir v1.5 jscript_test.rb. Carlos From paul.rogers at shaw.ca Mon Mar 5 22:28:33 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 05 Mar 2007 20:28:33 -0700 Subject: [Wtr-general] Excel Interface Class References: <44B054F46C2E4E4996C27D92F9B825EE04BB43B9@SVR-ORW-EXC-07.mgc.mentorg.com> Message-ID: <08ce01c75f9f$84d3a490$6400a8c0@laptop> I use Open Office. Having the Excel reader is handy, but it obviously doesnt work for me. I started working on some code that would read open office spreadhseet files. It would be great if you could make it work on both, with the same interface, especially as things like firewatir and safari watir work well on non windows platforms. The open office format is an xml file in a zip, and its actually quite easy to work with. I can send you my code if you like Paul ----- Original Message ----- From: "Brown, David" To: Sent: Friday, March 02, 2007 4:47 PM Subject: [Wtr-general] Excel Interface Class > 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 > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From sw_latha at yahoo.com Mon Mar 5 22:34:24 2007 From: sw_latha at yahoo.com (swarna latha) Date: Mon, 5 Mar 2007 19:34:24 -0800 (PST) Subject: [Wtr-general] How to clear the cache of the browser? Message-ID: <630684.4875.qm@web56208.mail.re3.yahoo.com> Before launching a web page , I need to clear the cache / temp files/cookies of the browser. How can I do it ? Can we do a keyword based search on the Wtr general archive list? I seem to find it a bit difficult to go through archive (2004 to 2007) everytime ...maybe I am missing something obvious.. Thanks for the help. Swarna. ____________________________________________________________________________________ Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070305/556bc366/attachment.html From paul.rogers at shaw.ca Mon Mar 5 22:51:08 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 05 Mar 2007 20:51:08 -0700 Subject: [Wtr-general] How to clear the cache of the browser? References: <630684.4875.qm@web56208.mail.re3.yahoo.com> Message-ID: <090f01c75fa2$ac652940$6400a8c0@laptop> google advanced search lets you pick the domain you want to search on. You can just delete the files from the file system. There is also some code in contrib to remove cookies. You could easily extend that to do all the files. I always set my browser to 'always get a new page' goto Tools menu Internet options then on ie 7 click Settings on the Browsing history section and pick 'Every time I visit the web page' IE 6 is similar Paul ----- Original Message ----- From: swarna latha To: wtr-general at rubyforge.org Sent: Monday, March 05, 2007 8:34 PM Subject: [Wtr-general] How to clear the cache of the browser? Before launching a web page , I need to clear the cache / temp files/cookies of the browser. How can I do it ? Can we do a keyword based search on the Wtr general archive list? I seem to find it a bit difficult to go through archive (2004 to 2007) everytime ...maybe I am missing something obvious.. Thanks for the help. Swarna. ------------------------------------------------------------------------------ 8:00? 8:25? 8:40? Find a flick in no time with theYahoo! Search movie showtime shortcut. ------------------------------------------------------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070305/ea0606a4/attachment.html From tester.paul at gmail.com Mon Mar 5 23:14:38 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Mon, 5 Mar 2007 23:14:38 -0500 Subject: [Wtr-general] Excel Interface Class In-Reply-To: <08ce01c75f9f$84d3a490$6400a8c0@laptop> References: <44B054F46C2E4E4996C27D92F9B825EE04BB43B9@SVR-ORW-EXC-07.mgc.mentorg.com> <08ce01c75f9f$84d3a490$6400a8c0@laptop> Message-ID: <37c405480703052014p234caea8s4a62b95e9f8fbfc3@mail.gmail.com> By any chance, would anyone be interested in writing a hook into Google Spreadsheets? I guess you'd sacrifice speed for portability. Paul C. On 05/03/07, Paul Rogers wrote: > > I use Open Office. Having the Excel reader is handy, but it obviously > doesnt > work for me. I started working on some code that would read open office > spreadhseet files. It would be great if you could make it work on both, > with > the same interface, especially as things like firewatir and safari watir > work well on non windows platforms. > > The open office format is an xml file in a zip, and its actually quite > easy > to work with. > I can send you my code if you like > > Paul > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070305/1a784524/attachment.html From zeljko.filipin at gmail.com Tue Mar 6 06:12:42 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Tue, 6 Mar 2007 12:12:42 +0100 Subject: [Wtr-general] How to clear the cache of the browser? In-Reply-To: <630684.4875.qm@web56208.mail.re3.yahoo.com> References: <630684.4875.qm@web56208.mail.re3.yahoo.com> Message-ID: On 3/6/07, swarna latha wrote: > > Can we do a keyword based search on the Wtr general archive list? > There is answer in FAQ. http://wiki.openqa.org/display/WTR/FAQ#FAQ-Searchingthemailarchives There is search form at http://wtr.rubyforge.org/ http://www.mail-archive.com/wtr-general%40rubyforge.org/ http://forums.openqa.org/forum.jspa?forumID=5 -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070306/c7dede4d/attachment.html From forum-watir-users at openqa.org Tue Mar 6 11:15:42 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Tue, 06 Mar 2007 10:15:42 CST Subject: [Wtr-general] Selecting an 'accented character' from a list In-Reply-To: <48877863.1172940542053.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <38849681.1173197772112.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Ok, you guys helped me out more then i thought. The *real* problem was that i was using single quotes and that my editor was corrupting the accented characters. I now pull the values straight from the db, wrap some basic ruby around them and make a translation file. Works like a champ! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6766&messageID=19591#19591 From charley.baker at gmail.com Tue Mar 6 14:02:51 2007 From: charley.baker at gmail.com (Charley Baker) Date: Tue, 6 Mar 2007 12:02:51 -0700 Subject: [Wtr-general] Accessing a dhtml menu Message-ID: Hi all, I'm having a bit of trouble accessing menu drop downs which are created by using ie's createPopup method. I've got an application that has some divs, which then get shoved into the content of a popup/menu item.
References: <630684.4875.qm@web56208.mail.re3.yahoo.com> Message-ID: <73e7817e0703061313u5f569516ibe875f4530923275@mail.gmail.com> Someone posted a Ruby snippet here which will clear the IE cache: http://rubyforge.org/snippet/detail.php?type=snippet&id=26 I've used it from time to time and it seems to work fine. It uses functions from the MS WinINet API to walk the cache and delete each item. Thanks Bill On 3/5/07, swarna latha wrote: > > Before launching a web page , I need to clear the cache / temp > files/cookies of the browser. How can I do it ? > Can we do a keyword based search on the Wtr general archive list? I seem to > find it a bit difficult to go through archive (2004 to 2007) everytime > ...maybe I am missing something obvious.. > > Thanks for the help. > Swarna. > > > ________________________________ > 8:00? 8:25? 8:40? Find a flick in no time > with theYahoo! Search movie showtime shortcut. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Tue Mar 6 17:49:29 2007 From: forum-watir-users at openqa.org (Duke) Date: Tue, 06 Mar 2007 16:49:29 CST Subject: [Wtr-general] PopUp window problem In-Reply-To: <51084124.1172670160077.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <54963707.1173221487136.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> If we're not dealing with a modal dialog, but an actual new window, often Watir doesn't wait correctly since it's only worrying about whether the current window is done loading, not what the pop-up is doing. Here's my fix: def get_popup(how, what) tries = 100 popup = nil until popup do begin sleep(0.1) popup = IE.attach(how, what) rescue => e raise e if (tries -= 1) <= 0 end end popup end @ie_popup_window = get_popup(:title, /Drive Admin/) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6726&messageID=19599#19599 From David_Brown at mentor.com Tue Mar 6 18:10:09 2007 From: David_Brown at mentor.com (Brown, David) Date: Tue, 6 Mar 2007 15:10:09 -0800 Subject: [Wtr-general] Excel Interface Class - extend to openoffice/google spreadsheets In-Reply-To: Message-ID: <44B054F46C2E4E4996C27D92F9B825EE04BB47A3@SVR-ORW-EXC-07.mgc.mentorg.com> I currently don't have the time/motivation to extend the excel interface class to work with Open Office and Google spreadsheet, however, If someone really needs to do this it shouldn't be too difficult. Only the following methods of the XLS class contain excel specific commands that would need to be overridden: -Initialize()#opens an excel file -getRangebyLabel()#finds a range of data dynamically -getWorksheet()#finds a worksheet to use -get2DArray()#returns a 2D array of data based on a given range and worksheet name. -David Brown -------------------------------------- >From: Paul Rogers >I use Open Office. Having the Excel reader is handy, but it obviously doesnt work for me. I started working on some code that would read open office spreadhseet files. It would be great if you could make it work on both, with the same interface, especially as things like firewatir and safari watir work well on non windows platforms. >The open office format is an xml file in a zip, and its actually quite easy to work with. >I can send you my code if you like >Paul From forum-watir-users at openqa.org Tue Mar 6 19:27:22 2007 From: forum-watir-users at openqa.org (matt) Date: Tue, 06 Mar 2007 18:27:22 CST Subject: [Wtr-general] 'ie.close' or 'ie.close if ie' In-Reply-To: <45DDA429.6020400@pettichord.com> Message-ID: <47870548.1173227353442.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello, I am new to Ruby/watir ... so forgive me plz. After reading through the "ie window" threads, I am still puzzled how to create a single ie browser for my test. Questions: 1) If there is one browser instance for the test, how is one to close the browser at the end of the test? Should a test_closebrowser() method be created at the end? 2) When using this example, I am finding that the @ie instance variable is nil at the beginning of each test method. Isn't the instance variable supposed to be persistent throughout all of the tests? 3) I looked through the examples, but couldn't find an example of the IE.attach() method. Should I keep track of the window handle when the instance is created and just reference that throughout the test? Thanks in advance Here is a simple example require 'watir' require 'test/unit' class My_TestCase < Test::Unit::TestCase # Instance variables @ie = nil def test_01_initialtest # create a new browser for the test (if necessary) @ie = Watir::IE.new if @ie == nil # do some work ... end def test_02_secondtest # create a new browser for the test (if necessary) @ie = Watir::IE.new if @ie == nil # do some work ... end end --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6562&messageID=19604#19604 From sw_latha at yahoo.com Tue Mar 6 21:48:30 2007 From: sw_latha at yahoo.com (swarna latha) Date: Tue, 6 Mar 2007 18:48:30 -0800 (PST) Subject: [Wtr-general] Excel Interface Class Message-ID: <863529.98340.qm@web56206.mail.re3.yahoo.com> 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 ____________________________________________________________________________________ Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070306/f3f05f8c/attachment.html From forum-watir-users at openqa.org Wed Mar 7 01:14:47 2007 From: forum-watir-users at openqa.org (Bret Pettichord) Date: Wed, 07 Mar 2007 00:14:47 CST Subject: [Wtr-general] OT: The original problem. Re: A small doubt in Ruby In-Reply-To: <72799cd70703051013y2db790bdhde0ba513595e92bd@mail.gmail.com> Message-ID: <63439375.1173248117733.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> > Apparently inside an "each" loop you're only working > on a copy of the > item, not the item itself, so to_s isn't actually > working on the real > items in the array. This is not true. The problem is not that you have a copy, but rather that your reference ('item") is local to the block. Changing it doesn't change anything outside the block. The problem isn't with what you are given in the block, but rather with what you are doing with it. > aoa = [[1,2,3],[4,5,6]] > aoa.each do |arr| > arr.each do |item| > item = item.to_s > end > To make this work, you have to use "map": > > aoa.each do |arr| > arr.map! do |item| > item = item.to_s > end Note that "item" is a local variable and that therefore changing its value has absolutely no effect. In other words, this code does exactly the same thing: aoa.each do |arr| arr.map! do |item| item.to_s end Your post suggested that "map!" increases the scope of the bound variable. But actually what it does is replace the item in arr with the value returned by the block. A side effect of assignment is that it returns the value, and that is what is actually doing the work. Bret --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6791&messageID=19606#19606 From forum-watir-users at openqa.org Wed Mar 7 01:25:04 2007 From: forum-watir-users at openqa.org (Bret Pettichord) Date: Wed, 07 Mar 2007 00:25:04 CST Subject: [Wtr-general] Calling Definition again! In-Reply-To: <57950257.1173143787896.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36547027.1173248734795.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Please post some Ruby code that demonstrates your problem. What you posted was pseudo-code and I was not able to follow it. Please post code that we can run, so we can see your problem. Bret --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6734&messageID=19607#19607 From forum-watir-users at openqa.org Wed Mar 7 01:37:57 2007 From: forum-watir-users at openqa.org (Bret Pettichord) Date: Wed, 07 Mar 2007 00:37:57 CST Subject: [Wtr-general] Problems accessing modal_dialog from ruby v. 1.8.5 In-Reply-To: <4440693B7CFF2440ABC2E0BE480DABA10A3712@EX01-2.rl.gov> Message-ID: <37040346.1173249507371.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> > Do we have a timeline on when this will work in > 1.8.5? Is anyone working on this? I don't believe any one is working on it right now. The simple solution would be to merge our changes to the WIN32OLE library into the 1.8.5 version and recompile it. But then we'd have the same problem again with 1.8.6. The better solution would be to rewrite our IEDialog.dll so that it did not require a modified WIN32OLE. If there is work on Watir that you would like to see done, please vote for the corresponding Jira ticket. Bret --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6733&messageID=19608#19608 From jhe at resilience.com Wed Mar 7 01:50:57 2007 From: jhe at resilience.com (Jason He) Date: Wed, 7 Mar 2007 14:50:57 +0800 Subject: [Wtr-general] How to get the run result for each test case Message-ID: <200703071450567034434@resilience.com> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070307/c9326f64/attachment.html From jhe at resilience.com Wed Mar 7 02:46:42 2007 From: jhe at resilience.com (Jason He) Date: Wed, 7 Mar 2007 15:46:42 +0800 Subject: [Wtr-general] How to make sure that script run in line squence rather than alphabetical sequence when using load References: <200703071450567034434@resilience.com> Message-ID: <200703071546412034254@resilience.com> Dear all, It seems that the code executing sequence is accorrding to the alphabetical rather than according to the line number in the script, when include test cases using load (or require) method. For example, the test cases sequence in scritp "test.rb" as follow, load 'rt/rt_r_login.rb' load 'rt/rt_w_login.rb' load 'rt/rt_r_system_admin_nameserver.rb' load 'rt/rt_w_system_admin_nameserver.rb' load 'rt/rt_r_system_admin_admin_password.rb' load 'rt/rt_w_system_admin_admin_password.rb' load 'rt/rt_r_system_admin_admin_mail.rb' load 'rt/rt_w_system_admin_admin_mail.rb' In fact that the executing sequence as follow, ./rt/rt_r_login.rb ./rt/rt_r_system_admin_admin_mail.rb ./rt/rt_r_system_admin_admin_password.rb ./rt/rt_r_system_admin_nameserver.rb ./rt/rt_w_login.rb ./rt/rt_w_system_admin_admin_mail.rb ./rt/rt_w_system_admin_admin_password.rb ./rt/rt_w_system_admin_nameserver.rb Now, I want to use the line sequence in script "test.rb" rather alphabetical sequence, is there a way to achieve it? Regards, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070307/3257ba0f/attachment-0001.html From zeljko.filipin at gmail.com Wed Mar 7 06:19:16 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Wed, 7 Mar 2007 12:19:16 +0100 Subject: [Wtr-general] How to make sure that script run in line squence rather than alphabetical sequence when using load In-Reply-To: <200703071546412034254@resilience.com> References: <200703071450567034434@resilience.com> <200703071546412034254@resilience.com> Message-ID: Maybe this will help. http://wiki.openqa.org/display/WTR/Test-Unit+Patch -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070307/993e0c71/attachment.html From zeljko.filipin at gmail.com Wed Mar 7 06:37:38 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Wed, 7 Mar 2007 12:37:38 +0100 Subject: [Wtr-general] WTR-103 comment spam Message-ID: I was browsing Watir Jira tickets, and WTR-103 has a lot of comment spam. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070307/7cea20d2/attachment.html From esjewett at gmail.com Wed Mar 7 10:31:28 2007 From: esjewett at gmail.com (Ethan Jewett) Date: Wed, 7 Mar 2007 09:31:28 -0600 Subject: [Wtr-general] Wait issue with file_field.set, solution Message-ID: <68f4a0e80703070731j50b7b65dy4f2807b8679d7b78@mail.gmail.com> 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 "click"s 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 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 at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- A non-text attachment was scrubbed... Name: watir 1.5.1163 - no_wait option in file_field.set.patch Type: application/octet-stream Size: 858 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20070307/e8683d5a/attachment.obj From charley.baker at gmail.com Wed Mar 7 10:56:41 2007 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 7 Mar 2007 08:56:41 -0700 Subject: [Wtr-general] Excel Interface Class In-Reply-To: <863529.98340.qm@web56206.mail.re3.yahoo.com> References: <863529.98340.qm@web56206.mail.re3.yahoo.com> Message-ID: 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 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? Loosen up... > Download and play hundreds of games for freeon Yahoo! Games. > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070307/18959b6a/attachment.html From charley.baker at gmail.com Wed Mar 7 11:22:15 2007 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 7 Mar 2007 09:22:15 -0700 Subject: [Wtr-general] How to get the run result for each test case In-Reply-To: <200703071450567034434@resilience.com> References: <200703071450567034434@resilience.com> Message-ID: 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 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 at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070307/5659acbb/attachment.html From David_Brown at mentor.com Wed Mar 7 11:24:57 2007 From: David_Brown at mentor.com (Brown, David) Date: Wed, 7 Mar 2007 08:24:57 -0800 Subject: [Wtr-general] Excel Interface Class In-Reply-To: <863529.98340.qm@web56206.mail.re3.yahoo.com> Message-ID: <44B054F46C2E4E4996C27D92F9B825EE04BB4843@SVR-ORW-EXC-07.mgc.mentorg.com> 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:sw_latha at yahoo.com] Sent: Tuesday, March 06, 2007 6:49 PM To: Brown, David Cc: billagee at gmail.com; wtr-general at 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 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070307/93c43b09/attachment.html From forum-watir-users at openqa.org Wed Mar 7 12:14:20 2007 From: forum-watir-users at openqa.org (Steven List) Date: Wed, 07 Mar 2007 11:14:20 CST Subject: [Wtr-general] Seemingly bogus error in simple script Message-ID: <51579714.1173287715853.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> 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=6823&messageID=19642#19642 From forum-watir-users at openqa.org Wed Mar 7 13:24:19 2007 From: forum-watir-users at openqa.org (matt) Date: Wed, 07 Mar 2007 12:24:19 CST Subject: [Wtr-general] Seemingly bogus error in simple script In-Reply-To: <51579714.1173287715853.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <48231171.1173291917983.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> 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=6823&messageID=19647#19647 From charley.baker at gmail.com Wed Mar 7 14:05:06 2007 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 7 Mar 2007 12:05:06 -0700 Subject: [Wtr-general] Seemingly bogus error in simple script In-Reply-To: <51579714.1173287715853.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <51579714.1173287715853.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: 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 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=6823&messageID=19642#19642 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070307/1d6879eb/attachment.html From forum-watir-users at openqa.org Wed Mar 7 14:28:37 2007 From: forum-watir-users at openqa.org (Steven List) Date: Wed, 07 Mar 2007 13:28:37 CST Subject: [Wtr-general] Seemingly bogus error in simple script In-Reply-To: <51579714.1173287715853.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <47704167.1173295747124.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Upgrading to the latest development version fixed the problem. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6823&messageID=19650#19650 From forum-watir-users at openqa.org Wed Mar 7 14:33:59 2007 From: forum-watir-users at openqa.org (Lauren) Date: Wed, 07 Mar 2007 13:33:59 CST Subject: [Wtr-general] Problems mapping to: http://forums.openqa.org/post!default.jspa?forumID=5 Message-ID: <42828624.1173296109324.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> 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=6828&messageID=19653#19653 From forum-watir-users at openqa.org Wed Mar 7 14:35:55 2007 From: forum-watir-users at openqa.org (Lauren) Date: Wed, 07 Mar 2007 13:35:55 CST Subject: [Wtr-general] Problems mapping to: http://forums.openqa.org/post!default.jspa?forumID=5 In-Reply-To: <42828624.1173296109324.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <39261926.1173296197300.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> 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=6828&messageID=19654#19654 From forum-watir-users at openqa.org Wed Mar 7 14:38:29 2007 From: forum-watir-users at openqa.org (Lauren) Date: Wed, 07 Mar 2007 13:38:29 CST Subject: [Wtr-general] Problems mapping to: http://forums.openqa.org/post!default.jspa?forumID=5 In-Reply-To: <39261926.1173296197300.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <63902267.1173296339910.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> 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=6828&messageID=19655#19655 From charley.baker at gmail.com Wed Mar 7 15:46:47 2007 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 7 Mar 2007 13:46:47 -0700 Subject: [Wtr-general] Seemingly bogus error in simple script In-Reply-To: <48231171.1173291917983.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <51579714.1173287715853.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <48231171.1173291917983.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: 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 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=6823&messageID=19647#19647 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070307/461fbba3/attachment.html From forum-watir-users at openqa.org Wed Mar 7 16:55:53 2007 From: forum-watir-users at openqa.org (matt) Date: Wed, 07 Mar 2007 15:55:53 CST Subject: [Wtr-general] Problems mapping to: http://forums.openqa.org/post!default.jspa?forumID In-Reply-To: <63902267.1173296339910.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <40478836.1173304594473.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> 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=6828&messageID=19657#19657 From jeff.fry at gmail.com Wed Mar 7 20:06:09 2007 From: jeff.fry at gmail.com (Jeff Fry) Date: Wed, 7 Mar 2007 17:06:09 -0800 Subject: [Wtr-general] WIN32OLERuntimeError: unknown property or method `readOnly' Message-ID: <970956b0703071706v55d60730pdd2dd0c3e1ee331c@mail.gmail.com> 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 = "jeff.fry at gmail.com" > $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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070307/e058fa05/attachment-0001.html From Jason.He at resilience.com Thu Mar 8 04:22:18 2007 From: Jason.He at resilience.com (Jason He) Date: Thu, 8 Mar 2007 01:22:18 -0800 Subject: [Wtr-general] How to make sure that script run in line squencerather than alphabetical sequence when using load In-Reply-To: Message-ID: Yes, give the class name with suffix ?Sequence? can make sure the code executing sequence according to line number in the script. However, it seems that code in the other script won?t execute when ?load? method is embraced in the class/function block. --------------------------------------------------------------------------- require 'watir/testcase' class TC2_Sequential < Watir::TestCase def test_b; load 'rt/rt_r_login.rb'; print 'E'; end def test_a; load 'rt/rt_w_login.rb' print 'F'; end def test_d; load 'rt/rt_r_system_admin_nameserver.rb' print 'G'; end def test_c; load 'rt/rt_w_system_admin_nameserver.rb' print 'H'; end end --------------------------------------------------------------------------- The output as follow, --------------------------------------------------------------------------- C:\watir1145>test.rb Loaded suite C:/watir1145/test Started E.F.G.H. Finished in 0.0 seconds. 4 tests, 0 assertions, 0 failures, 0 errors --------------------------------------------------------------------------- Is there anything I missed? Regards, Jason ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of ?eljko Filipin Sent: 2007?3?7? 19:19 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to make sure that script run in line squencerather than alphabetical sequence when using load Maybe this will help. http://wiki.openqa.org/display/WTR/Test-Unit+Patch -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/610aa01d/attachment.html From quick.rep at gmail.com Thu Mar 8 07:52:48 2007 From: quick.rep at gmail.com (quick reply) Date: Thu, 8 Mar 2007 18:22:48 +0530 Subject: [Wtr-general] Report on Watir Message-ID: <313a040d0703080452s271db778wdd407ba7434baaf5@mail.gmail.com> Hi, Recently came accross this tool.It seems very useful for testing web based application.Can anybody give me a pointer for comparing this tool with other opensouce tool like Samie,Pamie,Selenium etc... Mean i would like to know how WATIR is better than other tool.Some comparision studies. And what are the risk involved in using WATIR? what are the limitations? Help will be highly appreciated. Thanks Quick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/14716981/attachment.html From zeljko.filipin at gmail.com Thu Mar 8 08:11:42 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 8 Mar 2007 14:11:42 +0100 Subject: [Wtr-general] Problems mapping to: http://forums.openqa.org/post!default.jspa?forumID=5 In-Reply-To: <42828624.1173296109324.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <42828624.1173296109324.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 3/7/07, Lauren wrote: > > Anyone know how to pass on this information to the forum "managers" of > this site?? > See http://openqa.org/contacting.action -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/8bea7859/attachment.html From zeljko.filipin at gmail.com Thu Mar 8 08:41:53 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 8 Mar 2007 14:41:53 +0100 Subject: [Wtr-general] Report on Watir In-Reply-To: <313a040d0703080452s271db778wdd407ba7434baaf5@mail.gmail.com> References: <313a040d0703080452s271db778wdd407ba7434baaf5@mail.gmail.com> Message-ID: On 3/8/07, quick reply wrote: > > Can anybody give me a pointer for comparing this tool with other opensouce > tool like Samie,Pamie,Selenium etc... Comparisons between Watir and SilkTest http://wiki.openqa.org/display/WTR/Comparison+of+Watir+with+Silk+Test what are the limitations? For me the only problem is that there is no easy way to deal with all pop-ups. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/0f1c3bfa/attachment.html From Mark_Cain at RL.gov Thu Mar 8 09:42:40 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Thu, 8 Mar 2007 06:42:40 -0800 Subject: [Wtr-general] How to make sure that script run in linesquencerather than alphabetical sequence when using load In-Reply-To: References: Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A3729@EX01-2.rl.gov> I ran into this irritating behavior a while back and it appears that ruby ASCII sorts the test methods before execution. I solved it by putting 01, 02, 03, ... after 'test' (test01, test02, etc) and then the test would run in the order I put them in. --------------------------------------------------------------------------- require 'watir/testcase' class TC2_Sequential < Watir::TestCase def test01_b; load 'rt/rt_r_login.rb'; print 'E'; end def test02_a; load 'rt/rt_w_login.rb' print 'F'; end def test03_d; load 'rt/rt_r_system_admin_nameserver.rb' print 'G'; end def test04_c; load 'rt/rt_w_system_admin_nameserver.rb' print 'H'; end end --------------------------------------------------------------------------- Hope this helps, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jason He Sent: Thursday, March 08, 2007 1:22 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to make sure that script run in linesquencerather than alphabetical sequence when using load Yes, give the class name with suffix ?Sequence? can make sure the code executing sequence according to line number in the script. However, it seems that code in the other script won?t execute when ?load? method is embraced in the class/function block. --------------------------------------------------------------------------- require 'watir/testcase' class TC2_Sequential < Watir::TestCase def test_b; load 'rt/rt_r_login.rb'; print 'E'; end def test_a; load 'rt/rt_w_login.rb' print 'F'; end def test_d; load 'rt/rt_r_system_admin_nameserver.rb' print 'G'; end def test_c; load 'rt/rt_w_system_admin_nameserver.rb' print 'H'; end end --------------------------------------------------------------------------- The output as follow, --------------------------------------------------------------------------- C:?watir1145>test.rb Loaded suite C:/watir1145/test Started E.F.G.H. Finished in 0.0 seconds. 4 tests, 0 assertions, 0 failures, 0 errors --------------------------------------------------------------------------- Is there anything I missed? Regards, Jason ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of ?eljko Filipin Sent: 2007?3?7? 19:19 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to make sure that script run in line squencerather than alphabetical sequence when using load Maybe this will help. http://wiki.openqa.org/display/WTR/Test-Unit+Patch -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/dd1ca323/attachment-0001.html From mramsey at dsbox.com Thu Mar 8 09:44:59 2007 From: mramsey at dsbox.com (Mike Ramsey) Date: Thu, 8 Mar 2007 06:44:59 -0800 Subject: [Wtr-general] Identifying the id of the element with focus after a tab Message-ID: <6B0903DD553D4341AA4741D2A5B2CD53CE92D0@DHOST001-30.DEX001.intermedia.net> I am fairly new to watir so please bear with me. I am using AutoIt to send {TAB} commands to IE from watir. class WindowHelper #Begin stuff Ramsey added def push_key(winTitleText,keyStroke) wait_for_window(winTitleText) if keyStroke != "" and keyStroke != " " keyStroke = "{" + keyStroke + "}" #puts "keyStroke = #{keyStroke}" @autoit.Send keyStroke #puts "keyStroke sent" end widgetId = @autoit.ControlGetFocus winTitleText, "" puts "ControlRef# = #{widgetId}" end def wait_for_window(winTitleText) unless @autoit.WinWait winTitleText, "", 7 raise ("Timed out waiting for window #{winTitleText}") end end #End stuff Ramsey added ooo How can I verify the id of the widget that I tabbed too? I tried using the AutoIt ControlGetFocus function but it returned a generic string identical for several widgets in a row (they were hyperlinks). On a related question, can someone point me to an example script where control was passed back and forth between AutoIt and watir? That is, a script that shows how I could get the HTML element id from an autoit instance so that I could then use that id with an ie instance. Does this make sense? --Thanks, --Mike Ramsey -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/b6f1111b/attachment.html From charley.baker at gmail.com Thu Mar 8 10:32:56 2007 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 8 Mar 2007 08:32:56 -0700 Subject: [Wtr-general] WIN32OLERuntimeError: unknown property or method `readOnly' In-Reply-To: <970956b0703071706v55d60730pdd2dd0c3e1ee331c@mail.gmail.com> References: <970956b0703071706v55d60730pdd2dd0c3e1ee331c@mail.gmail.com> Message-ID: Hey Jeff, I'm not able to get to the site you have listed in your test, seems the url might be local to your internal network? When you include unittests/setup there's a line at the beginning there: END {$ie.close if $ie; Watir::IE.quit} which closes ie when your tests are done running. -Charley On 3/7/07, Jeff Fry wrote: > > 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 = "jeff.fry at gmail.com" > > $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 at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/5a746ca5/attachment.html From charley.baker at gmail.com Thu Mar 8 10:53:15 2007 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 8 Mar 2007 08:53:15 -0700 Subject: [Wtr-general] Identifying the id of the element with focus after a tab In-Reply-To: <6B0903DD553D4341AA4741D2A5B2CD53CE92D0@DHOST001-30.DEX001.intermedia.net> References: <6B0903DD553D4341AA4741D2A5B2CD53CE92D0@DHOST001-30.DEX001.intermedia.net> Message-ID: Hi Mike, When you're using AutoIt, you're working with windows controls, not html elements per se. There's no way that I'm aware of that you can easily get the html element id using AutoIt. It recognizes windows, controls and identifies them by using Window handles, text and the like. There's some code in watir.rb that uses window handles to access JSButtons with WinClicker. -Charley On 3/8/07, Mike Ramsey wrote: > > I am fairly new to watir so please bear with me. I am using AutoIt to > send {TAB} commands to IE from watir. > > > > class WindowHelper > > > > #Begin stuff Ramsey added > > def push_key(winTitleText,keyStroke) > > wait_for_window(winTitleText) > > if keyStroke != "" and keyStroke != " " > > keyStroke = "{" + keyStroke + "}" > > #puts "keyStroke = #{keyStroke}" > > @autoit.Send keyStroke > > #puts "keyStroke sent" > > end > > widgetId = @autoit.ControlGetFocus winTitleText, "" > > puts "ControlRef# = #{widgetId}" > > end > > > > def wait_for_window(winTitleText) > > unless @autoit.WinWait winTitleText, "", 7 > > raise ("Timed out waiting for window #{winTitleText}") > > end > > end > > > > #End stuff Ramsey added > > > > ooo > > > > How can I verify the id of the widget that I tabbed too? > > > > I tried using the AutoIt ControlGetFocus function but it returned a > generic string identical for several widgets in a row (they were > hyperlinks). > > > > On a related question, can someone point me to an example script where > control was passed back and forth between AutoIt and watir? That is, a > script that shows how I could get the HTML element id from an autoit > instance so that I could then use that id with an ie instance. Does this > make sense? > > > > --Thanks, > > --Mike Ramsey > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/07c23d41/attachment-0001.html From paul.rogers at shaw.ca Thu Mar 8 11:17:09 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 08 Mar 2007 09:17:09 -0700 Subject: [Wtr-general] Identifying the id of the element with focus after a tab References: <6B0903DD553D4341AA4741D2A5B2CD53CE92D0@DHOST001-30.DEX001.intermedia.net> Message-ID: <0a5401c7619d$39da3530$6400a8c0@laptop> there is a method ie.show_active that might do what you need Paul ----- Original Message ----- From: Charley Baker To: wtr-general at rubyforge.org Sent: Thursday, March 08, 2007 8:53 AM Subject: Re: [Wtr-general] Identifying the id of the element with focus after a tab Hi Mike, When you're using AutoIt, you're working with windows controls, not html elements per se. There's no way that I'm aware of that you can easily get the html element id using AutoIt. It recognizes windows, controls and identifies them by using Window handles, text and the like. There's some code in watir.rb that uses window handles to access JSButtons with WinClicker. -Charley On 3/8/07, Mike Ramsey wrote: I am fairly new to watir so please bear with me. I am using AutoIt to send {TAB} commands to IE from watir. class WindowHelper #Begin stuff Ramsey added def push_key(winTitleText,keyStroke) wait_for_window(winTitleText) if keyStroke != "" and keyStroke != " " keyStroke = "{" + keyStroke + "}" #puts "keyStroke = #{keyStroke}" @autoit.Send keyStroke #puts "keyStroke sent" end widgetId = @autoit.ControlGetFocus winTitleText, "" puts "ControlRef# = #{widgetId}" end def wait_for_window(winTitleText) unless @autoit.WinWait winTitleText, "", 7 raise ("Timed out waiting for window #{winTitleText}") end end #End stuff Ramsey added ooo How can I verify the id of the widget that I tabbed too? I tried using the AutoIt ControlGetFocus function but it returned a generic string identical for several widgets in a row (they were hyperlinks). On a related question, can someone point me to an example script where control was passed back and forth between AutoIt and watir? That is, a script that shows how I could get the HTML element id from an autoit instance so that I could then use that id with an ie instance. Does this make sense? --Thanks, --Mike Ramsey _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ------------------------------------------------------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/909b5efa/attachment.html From jeff.fry at gmail.com Thu Mar 8 12:28:12 2007 From: jeff.fry at gmail.com (Jeff Fry) Date: Thu, 8 Mar 2007 09:28:12 -0800 Subject: [Wtr-general] WIN32OLERuntimeError: unknown property or method `readOnly' In-Reply-To: References: <970956b0703071706v55d60730pdd2dd0c3e1ee331c@mail.gmail.com> Message-ID: <970956b0703080928p18b5efbbp9dbe7ea5458b8516@mail.gmail.com> Hey Charley, thanks for taking a look! Yeah, I mistakenly pasted an internal url. Our public site is: http://www.divinecaroline.com/public/login/show_login_page Jeff On 3/8/07, Charley Baker wrote: > > Hey Jeff, > > I'm not able to get to the site you have listed in your test, seems the > url might be local to your internal network? When you include > unittests/setup there's a line at the beginning there: END {$ie.close if > $ie; Watir:: IE.quit} which closes ie when your tests are done running. > > -Charley > > On 3/7/07, Jeff Fry wrote: > > > 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 = " jeff.fry at gmail.com" > > > $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 at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/fe54e451/attachment.html From charley.baker at gmail.com Thu Mar 8 13:35:31 2007 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 8 Mar 2007 11:35:31 -0700 Subject: [Wtr-general] WIN32OLERuntimeError: unknown property or method `readOnly' In-Reply-To: <970956b0703080928p18b5efbbp9dbe7ea5458b8516@mail.gmail.com> References: <970956b0703071706v55d60730pdd2dd0c3e1ee331c@mail.gmail.com> <970956b0703080928p18b5efbbp9dbe7ea5458b8516@mail.gmail.com> Message-ID: Had to change the id's you were using to access the html elements, this should work: require 'watir' include Watir require 'test/unit' class TC_SendManyMessages < Test::Unit::TestCase $email = 'jeff.fry at gmail.com' $pw = 'password' def test_send_many_messages ie = IE.start(' http://www.divinecaroline.com/public/login/show_login_page' ) ie.text_field(:id, 'user_email').set($email) ie.text_field(:id,'user_password').set($pw) ie.button(:name, 'login_button').click end end -Charley On 3/8/07, Jeff Fry wrote: > > Hey Charley, thanks for taking a look! Yeah, I mistakenly pasted an > internal url. Our public site is: > http://www.divinecaroline.com/public/login/show_login_page > Jeff > > On 3/8/07, Charley Baker wrote: > > > > Hey Jeff, > > > > I'm not able to get to the site you have listed in your test, seems > > the url might be local to your internal network? When you include > > unittests/setup there's a line at the beginning there: END {$ie.close if > > $ie; Watir:: IE.quit} which closes ie when your tests are done running. > > > > -Charley > > > > On 3/7/07, Jeff Fry < jeff.fry at gmail.com > wrote: > > > > > 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 = " jeff.fry at gmail.com" > > > > $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 at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ wtr-general > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/a747988e/attachment-0001.html From forum-watir-users at openqa.org Thu Mar 8 14:18:11 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Thu, 08 Mar 2007 13:18:11 CST Subject: [Wtr-general] How to clear the cache of the browser? In-Reply-To: <090f01c75fa2$ac652940$6400a8c0@laptop> Message-ID: <40936437.1173381530319.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Swarma, Actually, I believe keeping the cookies from writing to disk is a better solution than the one Paul is suggesting (using code to delete it). In IE7 (don't know about 6 but I think it is possible). In IE7, do the following: 1. Tools -> Internet Options 2. Click on the "Privacy" Tab 3. Click on the "Advanced" button 4. Check "Override automatic cookie handling" 5. Under First-Party Cookies, select "Block" 6. Under Third-Party Cookies, select "Block" 7. Check "Always allow session cookies" This will keep the cookies in memory for as long as the browser is open and clears them when the browser is closed. Cookies are never written to disk so the data does not persist across multiple IE processes. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6796&messageID=19696#19696 From forum-watir-users at openqa.org Thu Mar 8 16:13:09 2007 From: forum-watir-users at openqa.org (Steven List) Date: Thu, 08 Mar 2007 15:13:09 CST Subject: [Wtr-general] Assert in helper class in require'd file Message-ID: <49073666.1173388431087.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> At the moment, WATIR is kicking my butt in a small way. I want to use an assert() inside a class that is require'd by a test class. So it's =========================================== require 'includeFirst' $x = MyStuff.new class TC_blah def test_blah $x.verifyAndGo("blah") end end ======================================== and inside includeFirst.rb ======================================== require 'watir' require 'test/unit' class MyStuff def verifyAndGo(linkName) assert($ie.link(:text, linkName).exists?) $ie.link(:text, linkName).click end end ======================================== When I try to execute it, it tells me that it can't find assert. 1) Error: test_001_clientSearchLinkExists(TC_ClientAdmin): NoMethodError: undefined method `assert' for # ./includeFirst.rb:32:in `verifyAndGoToLink' Z:/.../WATIR tests/clientAdmin-nu.rb:26:in `test_001_clientSearchLinkExists' I'm sure this is dead simple, but it's got me stumped at the moment. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6835&messageID=19701#19701 From jeff.fry at gmail.com Thu Mar 8 16:25:46 2007 From: jeff.fry at gmail.com (Jeff Fry) Date: Thu, 8 Mar 2007 13:25:46 -0800 Subject: [Wtr-general] WIN32OLERuntimeError: unknown property or method `readOnly' In-Reply-To: References: <970956b0703071706v55d60730pdd2dd0c3e1ee331c@mail.gmail.com> <970956b0703080928p18b5efbbp9dbe7ea5458b8516@mail.gmail.com> Message-ID: <970956b0703081325v472fc89fl1236ab6836976d3d@mail.gmail.com> Thanks Charlie - you rock! Out of curiosity, how did you know to change (:id, 'label_user_email') to (:id, 'user_email') ? Was there something in the page source that I missed? Or did you just experiment with taking 'label_' off? ...Or asked differently, why did using 'label_user_email' give the error it did, rather than just telling me that the object was not found? Jeff On 3/8/07, Charley Baker wrote: > > Had to change the id's you were using to access the html elements, this > should work: > > require 'watir' > > include Watir > > require 'test/unit' > > class TC_SendManyMessages < Test::Unit::TestCase > > $email = 'jeff.fry at gmail.com' > > $pw = 'password' > > > > def test_send_many_messages > > ie = IE.start('http://www.divinecaroline.com/public/login/show_login_page' > ) > > ie.text_field(:id, 'user_email').set($email) > > ie.text_field(:id,'user_password').set($pw) > > ie.button(:name, 'login_button').click > > end > > end > -Charley > > > On 3/8/07, Jeff Fry < jeff.fry at gmail.com > wrote: > > > > Hey Charley, thanks for taking a look! Yeah, I mistakenly pasted an > > internal url. Our public site is: > > http://www.divinecaroline.com/public/login/show_login_page > > Jeff > > > > On 3/8/07, Charley Baker wrote: > > > > > > Hey Jeff, > > > > > > I'm not able to get to the site you have listed in your test, seems > > > the url might be local to your internal network? When you include > > > unittests/setup there's a line at the beginning there: END {$ie.close if > > > $ie; Watir:: IE.quit} which closes ie when your tests are done > > > running. > > > > > > -Charley > > > > > > On 3/7/07, Jeff Fry < jeff.fry at gmail.com > wrote: > > > > > > > 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 = " jeff.fry at gmail.com" > > > > > $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 at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/ wtr-general > > > > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/7553410f/attachment.html From Mark_Cain at RL.gov Thu Mar 8 17:04:49 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Thu, 8 Mar 2007 14:04:49 -0800 Subject: [Wtr-general] Assert in helper class in require'd file In-Reply-To: <49073666.1173388431087.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <49073666.1173388431087.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A372F@EX01-2.rl.gov> I am pretty sure your class need to inherit from Test::Unit::TestCase (if that is the right way to say it). class MyStuff < Test::Unit::TestCase def verifyAndGo(linkName) assert($ie.link(:text, linkName).exists?) $ie.link(:text, linkName).click end end --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Steven List Sent: Thursday, March 08, 2007 1:13 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Assert in helper class in require'd file At the moment, WATIR is kicking my butt in a small way. I want to use an assert() inside a class that is require'd by a test class. So it's =========================================== require 'includeFirst' $x = MyStuff.new class TC_blah def test_blah $x.verifyAndGo("blah") end end ======================================== and inside includeFirst.rb ======================================== require 'watir' require 'test/unit' class MyStuff def verifyAndGo(linkName) assert($ie.link(:text, linkName).exists?) $ie.link(:text, linkName).click end end ======================================== When I try to execute it, it tells me that it can't find assert. 1) Error: test_001_clientSearchLinkExists(TC_ClientAdmin): NoMethodError: undefined method `assert' for # ./includeFirst.rb:32:in `verifyAndGoToLink' Z:/.../WATIR tests/clientAdmin-nu.rb:26:in `test_001_clientSearchLinkExists' I'm sure this is dead simple, but it's got me stumped at the moment. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6835&messageID=19701#19701 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From tester.paul at gmail.com Thu Mar 8 17:07:10 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 8 Mar 2007 17:07:10 -0500 Subject: [Wtr-general] How to clear the cache of the browser? In-Reply-To: <40936437.1173381530319.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <090f01c75fa2$ac652940$6400a8c0@laptop> <40936437.1173381530319.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37c405480703081407g29180272i8c20f52b81ad122a@mail.gmail.com> Hi Bach, just wanted to chime in on your suggestion. I tried a similar IE 6 browser setup a year or so ago when testing one of our web apps. I noticed very strange behaviour that was directly traceable back to the Cookie settings. For our secure (https) web app, it was looking for some cookie information in the Cache rather than in memory for some of the pages. When it couldn't find it there, really strange things started happening in the application. Turning the cookies back on made the strange behaviour go away. After that test, our developers added a check for Cookies routine to keep us (testers, and users too) from doing it again. ;-) Just thought I'd throw it out there that sometimes turning off all Cookies is not a viable solution. Cheers! Paul C. On 08/03/07, Bach Le wrote: > > Swarma, > > Actually, I believe keeping the cookies from writing to disk is a better > solution than the one Paul is suggesting (using code to delete it). In IE7 > (don't know about 6 but I think it is possible). > > In IE7, do the following: > > 1. Tools -> Internet Options > 2. Click on the "Privacy" Tab > 3. Click on the "Advanced" button > 4. Check "Override automatic cookie handling" > 5. Under First-Party Cookies, select "Block" > 6. Under Third-Party Cookies, select "Block" > 7. Check "Always allow session cookies" > > This will keep the cookies in memory for as long as the browser is open > and clears them when the browser is closed. Cookies are never written to > disk so the data does not persist across multiple IE processes. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/940c1ceb/attachment-0001.html From charley.baker at gmail.com Thu Mar 8 17:07:35 2007 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 8 Mar 2007 15:07:35 -0700 Subject: [Wtr-general] Assert in helper class in require'd file In-Reply-To: <49073666.1173388431087.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <49073666.1173388431087.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: It's not really a Watir thing more of a test unit issue. You just need to require 'test/unit/assertions' and may want to include the Assertions module. Something like the following: > So it's > =========================================== > require 'includeFirst' > require 'test/unit' #is this a test class? if so you should > require this and inherit from TestCase most likely > $x = MyStuff.new > > class TC_blah < Test::Unit::TestCase # inherit from TestCase > def test_blah > $x.verifyAndGo("blah") > end > end > ======================================== > > and inside includeFirst.rb > > ======================================== > require 'watir' > #require 'test/unit' > require 'test/unit/assertions' # require the assertions library > class MyStuff include Test::Unit::Assertions # include this module now you have assertions as a mixin def verifyAndGo(linkName) > assert($ie.link(:text, linkName).exists?) > $ie.link(:text, linkName).click > end > end > ======================================== Hopefully that makes sense. -Charley -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/0f851906/attachment.html From charley.baker at gmail.com Thu Mar 8 17:11:44 2007 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 8 Mar 2007 15:11:44 -0700 Subject: [Wtr-general] WIN32OLERuntimeError: unknown property or method `readOnly' In-Reply-To: <970956b0703081325v472fc89fl1236ab6836976d3d@mail.gmail.com> References: <970956b0703071706v55d60730pdd2dd0c3e1ee331c@mail.gmail.com> <970956b0703080928p18b5efbbp9dbe7ea5458b8516@mail.gmail.com> <970956b0703081325v472fc89fl1236ab6836976d3d@mail.gmail.com> Message-ID: Heya Jeff, I checked out the page dom with ie dom explorer, the id's you had are for the labels on those controls, not the ids for the textfields. It found the control, but since it was a plain old text field, watir couldn't set the text on it. The error message is a little funky. -c On 3/8/07, Jeff Fry wrote: > > Thanks Charlie - you rock! > > Out of curiosity, how did you know to change (:id, 'label_user_email') to (:id, > 'user_email') ? Was there something in the page source that I missed? Or > did you just experiment with taking 'label_' off? > > ...Or asked differently, why did using 'label_user_email' give the error > it did, rather than just telling me that the object was not found? > > Jeff > > > On 3/8/07, Charley Baker wrote: > > > > Had to change the id's you were using to access the html elements, this > > should work: > > > > require 'watir' > > > > include Watir > > > > require 'test/unit' > > > > class TC_SendManyMessages < Test::Unit::TestCase > > > > $email = 'jeff.fry at gmail.com' > > > > $pw = 'password' > > > > > > > > def test_send_many_messages > > > > ie = IE.start('http://www.divinecaroline.com/public/login/show_login_page' > > ) > > > > ie.text_field(:id, 'user_email').set($email) > > > > ie.text_field(:id,'user_password').set($pw) > > > > ie.button(:name, 'login_button').click > > > > end > > > > end > > -Charley > > > > > > On 3/8/07, Jeff Fry < jeff.fry at gmail.com > wrote: > > > > > > Hey Charley, thanks for taking a look! Yeah, I mistakenly pasted an > > > internal url. Our public site is: > > > http://www.divinecaroline.com/public/login/show_login_page > > > Jeff > > > > > > On 3/8/07, Charley Baker wrote: > > > > > > > > Hey Jeff, > > > > > > > > I'm not able to get to the site you have listed in your test, > > > > seems the url might be local to your internal network? When you include > > > > unittests/setup there's a line at the beginning there: END {$ie.close if > > > > $ie; Watir:: IE.quit} which closes ie when your tests are done > > > > running. > > > > > > > > -Charley > > > > > > > > On 3/7/07, Jeff Fry < jeff.fry at gmail.com > wrote: > > > > > > > > > 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 = " jeff.fry at gmail.com" > > > > > > $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 at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Wtr-general mailing list > > > > Wtr-general at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/ wtr-general > > > > > > > > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/1aab2059/attachment.html From paul.rogers at shaw.ca Thu Mar 8 17:14:25 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 08 Mar 2007 15:14:25 -0700 Subject: [Wtr-general] Assert in helper class in require'd file References: <49073666.1173388431087.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <0a7901c761cf$219b0300$6400a8c0@laptop> class TC_bla < Test::Unit::Testcase ----- Original Message ----- From: "Steven List" To: Sent: Thursday, March 08, 2007 2:13 PM Subject: [Wtr-general] Assert in helper class in require'd file > At the moment, WATIR is kicking my butt in a small way. > > I want to use an assert() inside a class that is require'd by a test > class. > > So it's > =========================================== > require 'includeFirst' > > $x = MyStuff.new > > class TC_blah > def test_blah > $x.verifyAndGo("blah") > end > end > ======================================== > > and inside includeFirst.rb > > ======================================== > require 'watir' > require 'test/unit' > > class MyStuff > def verifyAndGo(linkName) > assert($ie.link(:text, linkName).exists?) > $ie.link(:text, linkName).click > end > end > ======================================== > > When I try to execute it, it tells me that it can't find assert. > > 1) Error: > test_001_clientSearchLinkExists(TC_ClientAdmin): NoMethodError: undefined > method `assert' for # > ./includeFirst.rb:32:in `verifyAndGoToLink' > Z:/.../WATIR tests/clientAdmin-nu.rb:26:in > `test_001_clientSearchLinkExists' > > I'm sure this is dead simple, but it's got me stumped at the moment. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6835&messageID=19701#19701 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From sergio.pinon at us.g4s.com Thu Mar 8 17:05:19 2007 From: sergio.pinon at us.g4s.com (Sergio Pinon) Date: Thu, 8 Mar 2007 14:05:19 -0800 Subject: [Wtr-general] WIN32OLERuntimeError: unknown property or method`readOnly' References: <970956b0703071706v55d60730pdd2dd0c3e1ee331c@mail.gmail.com><970956b0703080928p18b5efbbp9dbe7ea5458b8516@mail.gmail.com> <970956b0703081325v472fc89fl1236ab6836976d3d@mail.gmail.com> Message-ID: <4D7FC2322B85B848A0A766D1D364D436C53542@bugatti.ems.securicor.com> Jeff, I'm sure Charley will answer this as well but I just looked at it right now and if you look at the page source you will see that the control you were trying to access was a label and not a textfield. The label had the id of label_user_email. The textbox had the id of user_email. You probably just accidentally were looking at the label control and not the textbox control when you were determining the id to use. Sergio ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Fry Sent: Thursday, March 08, 2007 1:26 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] WIN32OLERuntimeError: unknown property or method`readOnly' Thanks Charlie - you rock! Out of curiosity, how did you know to change (:id, 'label_user_email') to (:id, 'user_email') ? Was there something in the page source that I missed? Or did you just experiment with taking 'label_' off? ...Or asked differently, why did using 'label_user_email' give the error it did, rather than just telling me that the object was not found? Jeff On 3/8/07, Charley Baker wrote: Had to change the id's you were using to access the html elements, this should work: require 'watir' include Watir require 'test/unit' class TC_SendManyMessages < Test::Unit::TestCase $email = 'jeff.fry at gmail.com' $pw = 'password' def test_send_many_messages ie = IE.start('http://www.divinecaroline.com/public/login/show_login_page' ) ie.text_field(:id, 'user_email').set($email) ie.text_field(:id,'user_password').set($pw) ie.button(:name, 'login_button').click end end -Charley On 3/8/07, Jeff Fry < jeff.fry at gmail.com > wrote: Hey Charley, thanks for taking a look! Yeah, I mistakenly pasted an internal url. Our public site is: http://www.divinecaroline.com/public/login/show_login_page Jeff On 3/8/07, Charley Baker wrote: Hey Jeff, I'm not able to get to the site you have listed in your test, seems the url might be local to your internal network? When you include unittests/setup there's a line at the beginning there: END {$ie.close if $ie; Watir:: IE.quit} which closes ie when your tests are done running. -Charley On 3/7/07, Jeff Fry < jeff.fry at gmail.com > wrote: 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 = " jeff.fry at gmail.com " $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 at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/ wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/c5fa3786/attachment.html From mramsey at dsbox.com Thu Mar 8 18:06:58 2007 From: mramsey at dsbox.com (Mike Ramsey) Date: Thu, 8 Mar 2007 15:06:58 -0800 Subject: [Wtr-general] Identifying the id of the element with focus after a tab In-Reply-To: References: Message-ID: <6B0903DD553D4341AA4741D2A5B2CD53CE9303@DHOST001-30.DEX001.intermedia.net> >Date: Thu, 08 Mar 2007 09:17:09 -0700 >From: Paul Rogers >Subject: Re: [Wtr-general] Identifying the id of the element with > >there is a method ie.show_active > >that might do what you need > >Paul Paul, I added the following to watir.rb # Return the element Id of the widget with focus def get_Id_with_focus p = nil begin current = document.activeElement p = current.invoke("id") rescue #activeElement doesn't have an id end return p end This appears to be doing the trick. Thank you! Next task is to integrate this into an assertFocus command that can be invoked from faucets .... --Thanks again, --Mike Ramsey >From: Charley Baker >Sent: Thursday, March 08, 2007 8:53 AM >Subject: Re: [Wtr-general] Identifying the id of the element with focus >after a tab > > Hi Mike, > > When you're using AutoIt, you're working with windows controls, not >html elements per se. There's no way that I'm aware of that you can easily >get the html element id using AutoIt. It recognizes windows, controls and >identifies them by using Window handles, text and the like. There's some >code in watir.rb that uses window handles to access JSButtons with >WinClicker. > > -Charley Charley, Thank you. I do appreciate the problem. Not all HTML Elements will have ids so handles may be the ultimate answer. It would be a good thing if AutoIt and watir behaved better on the playground. --Thanks again, --Mike Ramsey From jeff.fry at gmail.com Thu Mar 8 18:47:53 2007 From: jeff.fry at gmail.com (Jeff Fry) Date: Thu, 8 Mar 2007 15:47:53 -0800 Subject: [Wtr-general] Report on Watir In-Reply-To: <313a040d0703080452s271db778wdd407ba7434baaf5@mail.gmail.com> References: <313a040d0703080452s271db778wdd407ba7434baaf5@mail.gmail.com> Message-ID: <970956b0703081547n4a4e5be9mfad1ad52f66453c@mail.gmail.com> Take my replies with a grain of salt. Nowadays I just keep my toe in Watir (as it were) ;-) and am only beginning to learn Selenium RC. On 3/8/07, quick reply wrote: > > Hi, > > Recently came accross this tool.It seems very useful for testing > web based application.Can anybody give me a pointer for comparing > this tool with other opensouce tool like Samie,Pamie, I haven't played with Samie or Pamie, but my impression is that neither has as active a user base as Watir. Selenium etc... Selenium is a very different way to do something similar to what Watir does. Watir drives IE's COM interface, where Selenium drives most JS enabled browsers, using JS. Selenium thus has the advantage of running on Firefox (and a number of other browsers), while Watir has the advantage of not needing to install anything on the box that serves the application under test...and from what I hear a more powerful and intuitive set of libraries. Another advantage of Selenium RC is that it has APIs for many languages, where Watir uses ruby only. (Now, for me ruby is the language I want to write tests in anyway, but Selenium gives non-me people more options). I should note that FireWatir is a project that is porting Watir to FF. I hear that it's doing pretty well nowadays but I haven't ever used it myself. My general recommendation would be: If IE-only work for you, and you want to (or don't mind) coding in Ruby, choose Watir. If you want to add FF to your list, I would try out both Watir + FireWatir and Selenium RC. If FireWatir doesn't turn out to be sufficient FF support for you, or you want to code in a language Selenium RC supports, that's a great way to go too. My two cents, Jeff Fry http://testingjeff.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/93afb46a/attachment-0001.html From jeff.fry at gmail.com Thu Mar 8 18:51:05 2007 From: jeff.fry at gmail.com (Jeff Fry) Date: Thu, 8 Mar 2007 15:51:05 -0800 Subject: [Wtr-general] WIN32OLERuntimeError: unknown property or method`readOnly' In-Reply-To: <4D7FC2322B85B848A0A766D1D364D436C53542@bugatti.ems.securicor.com> References: <970956b0703071706v55d60730pdd2dd0c3e1ee331c@mail.gmail.com> <970956b0703080928p18b5efbbp9dbe7ea5458b8516@mail.gmail.com> <970956b0703081325v472fc89fl1236ab6836976d3d@mail.gmail.com> <4D7FC2322B85B848A0A766D1D364D436C53542@bugatti.ems.securicor.com> Message-ID: <970956b0703081551o198f8357va18f88b9ed366749@mail.gmail.com> Ahhh...that explains it...and will help me to catch this error if I make it again. Sergio and Charley, thanks again! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070308/7494e551/attachment.html From forum-watir-users at openqa.org Thu Mar 8 19:02:04 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Thu, 08 Mar 2007 18:02:04 CST Subject: [Wtr-general] How to clear the cache of the browser? In-Reply-To: <37c405480703081407g29180272i8c20f52b81ad122a@mail.gmail.com> Message-ID: <63272336.1173398554832.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks for the info Paul. We are currently also doing some tests with clearing cookies and cache. I'll be sure to test it out to make sure it works in that situation. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6796&messageID=19712#19712 From a.premkumar at gmail.com Fri Mar 9 00:24:32 2007 From: a.premkumar at gmail.com (Prem) Date: Fri, 9 Mar 2007 10:54:32 +0530 Subject: [Wtr-general] Active-X in Watir Message-ID: On 3/9/07, Jeff Fry wrote: > My general recommendation would be: If IE-only work for you, and you want > to (or don't mind) coding in Ruby, choose Watir. > We have IE only work, but mostly in applications like Siebel, Pega, Peoplesoft, etc., where we do not have the control on the html generated like in J2EE/.Net apps. Problem is that these pages most often contain Active-X controls. Active-X, I know, comes in a Microsoft proprietary format & is generally not supported by open source community. Still I would like to use some FLOSS test automation tool/framework since we do not have the option of spending on commercial automation tools, they being pretty steeply expensive. Is there support for Active-X in any of the open source tools? Or is there any way by which Watir can support Active-X objects? -- - Prem I spent a minute looking at my own code by accident. I was thinking "What the hell is this guy doing?" ---------------------------------------------------- Prem Kumar Aparanji M: 00919845226618 [Bangalore, KA, INDIA] http://scorpfromhell.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070309/4fec810d/attachment.html From kevin at rutherford-software.co.uk Fri Mar 9 08:54:25 2007 From: kevin at rutherford-software.co.uk (Kevin Rutherford) Date: Fri, 9 Mar 2007 13:54:25 +0000 Subject: [Wtr-general] Watir can't find IEnum interface Message-ID: <54b09a6d0703090554i3ec194bbj74c100dafca47758@mail.gmail.com> Hi, I know this question has been asked before, but I didn't see a resolution in the list archives... I have just installed Watir onto two different machines. On one, everything works fine (and Watir's tests all pass). But on the other I have a problem. Firstly, the Watir gem's tests don't pass: ERROR: 154 tests, 147 assertions, 40 failures, 84 errors (although there's no detail as to what assertions failed etc). Then there's a problem when I run Watir itself. Here's an irb session to illustrate: C:\...> irb irb(main):001:0> require 'watir' => true irb(main):002:0> ie = Watir::IE.new => # irb(main):003:0> ie.goto 'http://google.com' => 1.312 irb(main):004:0> ie.show_all_objects -----------Objects in page ------------- RuntimeError: failed to get IEnum Interface HRESULT error code:0x80004002 No such interface supported from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1586:in `each' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1586:in `show_all_objects' from (irb):4 (The choice of URL in the goto() is irrelevant, btw.) Can anyone suggest what's wrong? Many thanks, Kevin -- http://silkandspinach.net From paul.rogers at shaw.ca Fri Mar 9 12:33:59 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 09 Mar 2007 10:33:59 -0700 Subject: [Wtr-general] Identifying the id of the element with focus after a tab References: <6B0903DD553D4341AA4741D2A5B2CD53CE9303@DHOST001-30.DEX001.intermedia.net> Message-ID: <0b4901c76271$1f7b28a0$6400a8c0@laptop> i wonder if something like this should be added to watir: ie.active_element which returns the element with the focus as a watir object. Its harder to acheive than what you have, but maybe more usable Paul ----- Original Message ----- From: "Mike Ramsey" To: Sent: Thursday, March 08, 2007 4:06 PM Subject: Re: [Wtr-general] Identifying the id of the element with focus after a tab > >Date: Thu, 08 Mar 2007 09:17:09 -0700 >>From: Paul Rogers >>Subject: Re: [Wtr-general] Identifying the id of the element with >> >>there is a method ie.show_active >> >>that might do what you need >> >>Paul > > Paul, > I added the following to watir.rb > > # Return the element Id of the widget with focus > def get_Id_with_focus > > p = nil > begin > current = document.activeElement > p = current.invoke("id") > rescue > #activeElement doesn't have an id > end > return p > end > > This appears to be doing the trick. Thank you! > > Next task is to integrate this into an assertFocus command that can be > invoked from faucets .... > > --Thanks again, > --Mike Ramsey > > >>From: Charley Baker >>Sent: Thursday, March 08, 2007 8:53 AM >>Subject: Re: [Wtr-general] Identifying the id of the element with focus > >>after a tab >> >> Hi Mike, >> >> When you're using AutoIt, you're working with windows controls, not >>html elements per se. There's no way that I'm aware of that you can > easily >get the html element id using AutoIt. It recognizes windows, > controls and >identifies them by using Window handles, text and the > like. There's some >code in watir.rb that uses window handles to access > JSButtons with >WinClicker. >> >> -Charley > > Charley, > Thank you. I do appreciate the problem. Not all HTML Elements will > have ids so handles may be the ultimate answer. It would be a good > thing if AutoIt and watir behaved better on the playground. > > --Thanks again, > --Mike Ramsey > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Fri Mar 9 12:42:16 2007 From: forum-watir-users at openqa.org (Jonathan Kohl) Date: Fri, 09 Mar 2007 11:42:16 CST Subject: [Wtr-general] OT: The original problem. Re: A small doubt in Ruby In-Reply-To: <72799cd70703051013y2db790bdhde0ba513595e92bd@mail.gmail.com> Message-ID: <46685062.1173462354325.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> > Jonathan Kohl mentions an opposite but similar weirdness: > > a = %w[a b c] > b = a > b = %w[x y z] > p a > => > x y z > p b > => > x y z > when what was expected was this: > p a > => > ["a", "b", "c"] > _______________________________________________ I wouldn't characterize it as weirdness, it is just a pitfall that is common when people assign values in one way, and expect collections to behave the same way: irb(main):001:0> a = => 1 irb(main):002:0> b = => 1 irb(main):003:0> p a 1 => nil irb(main):004:0> p b 1 => nil irb(main):005:0> b = => 2 irb(main):006:0> p a 1 => nil irb(main):007:0> p b 2 => nil As Marick says, variables and objects are different kinds of things. The name of the thing is not the thing itself. Variables do not contain objects, they point to them. In the array example Chris posted, we assign "a", a reference which "points" to the collection containing "["a", "b","c"]", and then we assign "b", which is a reference to "a", not the collection. That can trip people up if they are used to doing things like I posted above. (I think I have that right, Bret or someone else could explain it better.) In Head First Java, Kathy Sierra explains this really well using pictures of remote controls pointing to objects. Marick had a really nice set of pictures for Scripting for Testers that explains this, but I'm not sure if it's in the book or not. -Jonathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6791&messageID=19731#19731 From forum-watir-users at openqa.org Sat Mar 10 01:51:03 2007 From: forum-watir-users at openqa.org (Shubha) Date: Sat, 10 Mar 2007 00:51:03 CST Subject: [Wtr-general] getting commnad line arguements In-Reply-To: Message-ID: <30103631.1173509516440.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Can you please post Chris's solution here? I need to pass some command line arguments like site, domain and database to my test suite. I need an exmaple for following two cases 1. For a Test suite For ex I have a testcase file like following class TC_TEST1 < Test::Unit::TestCase def setup end def start end def test_01_home end def test_02_home2 end end 2.For a Test Runner Here is an example file I have for test runner require 'test/unit/testsuite' require 'test2' class TS_MyTests def self.suite suite = Test::Unit::TestSuite::new suite << TC_TEST1.suite return suite end end Test::Unit::UI::Console::TestRunner.run(TS_MyTests) Which function do I access the command line arguments and how do I parse them? I need to be able to pass these values to progreess further with atuomating the test cases. Any help on this is greatly appreciated. Thanks in advance --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6527&messageID=19747#19747 From atulprakash21 at gmail.com Sat Mar 10 02:48:01 2007 From: atulprakash21 at gmail.com (Atul Prajapati) Date: Sat, 10 Mar 2007 02:48:01 -0500 (EST) Subject: [Wtr-general] Atul has Tagged you! :) Message-ID: <20070310074802.0AF545240B11@rubyforge.org> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070310/eef9cf02/attachment.html From forum-watir-users at openqa.org Sat Mar 10 12:31:14 2007 From: forum-watir-users at openqa.org (Bret Pettichord) Date: Sat, 10 Mar 2007 11:31:14 CST Subject: [Wtr-general] OT: The original problem. Re: A small doubt in Ruby In-Reply-To: <46685062.1173462354325.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <32119385.1173547904164.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> > As Marick says, variables and objects are different > kinds of things. The name of the thing is not the > thing itself. Variables do not contain objects, they > point to them. In the array example Chris posted, we > assign "a", a reference which "points" to the > collection containing "["a", "b","c"]", and then we > assign "b", which is a reference to "a", not the > collection. That can trip people up if they are used > to doing things like I posted above. > (I think I have that right, Bret or someone else > could explain it better.) Actually B is not a reference to A, but rather a reference to the same collection that A points to. They are both equally valid names for the same thing. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6791&messageID=19748#19748 From Jason.He at resilience.com Sun Mar 11 22:09:07 2007 From: Jason.He at resilience.com (Jason He) Date: Sun, 11 Mar 2007 19:09:07 -0700 Subject: [Wtr-general] Is there a global variable to control the scripts execution speed References: <32119385.1173547904164.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Dear all, Does watir/ruby provide a global configuration variable which could used to change the speed of execution, rather than add many "sleep" in each scripts. Regards, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070311/bbea5e67/attachment-0001.html From forum-watir-users at openqa.org Mon Mar 12 12:22:48 2007 From: forum-watir-users at openqa.org (Jonathan Kohl) Date: Mon, 12 Mar 2007 11:22:48 CDT Subject: [Wtr-general] OT: The original problem. Re: A small doubt in Ruby In-Reply-To: <32119385.1173547904164.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <35070895.1173716598872.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> > > (I think I have that right, Bret or someone else > > could explain it better.) > Actually B is not a reference to A, but rather a > reference to the same collection that A points to. > They are both equally valid names for the same thing. And on cue.. :-) Thanks for clearing that up. -Jonathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6791&messageID=19763#19763 From forum-watir-users at openqa.org Mon Mar 12 13:25:06 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Mon, 12 Mar 2007 12:25:06 CDT Subject: [Wtr-general] How to clear the cache of the browser? In-Reply-To: <37c405480703081407g29180272i8c20f52b81ad122a@mail.gmail.com> Message-ID: <61533875.1173720336814.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi Paul, I actually came across a problem with the method I described above today. I was scripting a page for a customer and the problem with the cookies occured. I had no idea what was wrong until I remembered that you mentioned that the cookies were the source of your problems. So thanks, you saved me hours of debugging. -Bach --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6796&messageID=19764#19764 From charley.baker at gmail.com Mon Mar 12 14:28:52 2007 From: charley.baker at gmail.com (Charley Baker) Date: Mon, 12 Mar 2007 11:28:52 -0700 Subject: [Wtr-general] Is there a global variable to control the scripts execution speed In-Reply-To: References: <32119385.1173547904164.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: There's not an execution control variable, but instead of sleep which is unreliable, the best bet when using Watir 1.5 is to use the wait_until method. For example, do something .... wait_until{ ie.button(:value, 'Click Me').exists?) # poll for some control to show up with defaults of timeout:60 seconds, poll every .5 seconds hth, Charley On 3/11/07, Jason He wrote: > > Dear all, > > > Does watir/ruby provide a global configuration variable which could used > to change the speed of execution, rather than add many "sleep" in each > scripts. > > > Regards, > Jason > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070312/121f3165/attachment.html From bob at jdstrategies.net Mon Mar 12 19:33:59 2007 From: bob at jdstrategies.net (Bob) Date: Mon, 12 Mar 2007 15:33:59 -0800 Subject: [Wtr-general] contract work in San Francisco Message-ID: <20070312234043.9BEFB5240B71@rubyforge.org> National retailer has an immediate need for a test engineer with experience in Ruby/WATiR. Work on a very high profile J2EE based Ecommerce effort. Lead type role, involving mainly test automation. 6-9 months downtown. Calls or email are fine. Thanks, Bob Bob Lepesh JD Strategies a workforce solutions service 343 State St. Suite 202 Los Altos, Calif. 94022 T. 650.941.2900 F. 650.941.2933 bob at jdstrategies.net http:/www.jdstrategies.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070312/75b385a5/attachment.html From mathewjk at yahoo-inc.com Tue Mar 13 07:15:36 2007 From: mathewjk at yahoo-inc.com (Mathew Jacob) Date: Tue, 13 Mar 2007 16:45:36 +0530 Subject: [Wtr-general] Question regarding buttonmenu Message-ID: Hi, I have one scenario that buttonmenu and two items in that buttonmenu. What is the command to select item in buttonmenu. Please guide me. Regards, Mathew Yahoo India, EGL, Bangalore - 71, Phone:+91-80-30516346, Mobile:+91-9945849925 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070313/88ff527a/attachment.html From mathewjk at yahoo-inc.com Tue Mar 13 07:05:31 2007 From: mathewjk at yahoo-inc.com (Mathew Jacob) Date: Tue, 13 Mar 2007 16:35:31 +0530 Subject: [Wtr-general] Confirmation Message-ID: Yahoo India, EGL, Bangalore - 71, Phone:+91-80-30516346, Mobile:+91-9945849925 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070313/9c1aa099/attachment.html From ftorres10 at comcast.net Tue Mar 13 07:32:32 2007 From: ftorres10 at comcast.net (ftorres10 at comcast.net) Date: Tue, 13 Mar 2007 07:32:32 -0400 Subject: [Wtr-general] Is there a global variable to control the scripts execution speed In-Reply-To: References: <32119385.1173547904164.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45F68BD0.5050105@comcast.net> Charley How do you change the time out ? Thanks. Charley Baker wrote: > There's not an execution control variable, but instead of sleep which > is unreliable, the best bet when using Watir 1.5 is to use the > wait_until method. > > For example, > > do something > .... > wait_until{ ie.button(:value, 'Click Me').exists?) # poll for some > control to show up with defaults of timeout:60 seconds, poll every .5 > seconds > > > hth, > > Charley > > > On 3/11/07, *Jason He* > wrote: > > Dear all, > Does watir/ruby provide a global configuration variable which > could used to change the speed of execution, rather than add many > "sleep" in each scripts. > Regards, > Jason > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > ------------------------------------------------------------------------ > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From forum-watir-users at openqa.org Tue Mar 13 09:29:02 2007 From: forum-watir-users at openqa.org (John) Date: Tue, 13 Mar 2007 08:29:02 CDT Subject: [Wtr-general] count specific links Message-ID: <38451005.1173792572339.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I want to count all links in the page which have "catalog/tree" in their url and then click one randomly. I know how to generate a random number, but how can I count the number of links? Thanks! John --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6867&messageID=19777#19777 From areed at relocationcentral.com Tue Mar 13 10:09:20 2007 From: areed at relocationcentral.com (Adam Reed) Date: Tue, 13 Mar 2007 09:09:20 -0500 Subject: [Wtr-general] count specific links In-Reply-To: <38451005.1173792572339.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <38451005.1173792572339.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36B5DBA88E027F47812ED877C6A978D8035029@rc-mail.relocationcentral.com> John, I've done this in the past by grabbing all the links of a certain type and storing them to an array. Then, with your random number variable (let's call it "n"), you can just do ArrayName(n) to grab one. For instance: ## For each link $ie finds, do the following: Take my Array, and add the href address of each link if and only if the address looks like "http://www.google.com". hrefs = Array.new url = "http://www.google.com" ie.links.each do |link| hrefs << link.href if /(#{url})/ =~ link.href end ## Then, using .length, you can grab the length of your Array and use it as your random number endpoint. length = hrefs.length #grab the length random = rand(length) #set a random number up to that link newlink = href[random] #set the link choice to the variable newlink ie.goto newlink #go to it! The above code can be simplified into two lines or so, but I wanted you to be able to see what I was doing. Hope that helps! Thanks, Adam Reed QA Engineer CORT Business Services -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of John Sent: Tuesday, March 13, 2007 8:29 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] count specific links Hi, I want to count all links in the page which have "catalog/tree" in their url and then click one randomly. I know how to generate a random number, but how can I count the number of links? Thanks! John --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6867&messageID=19777#19777 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From forum-watir-users at openqa.org Tue Mar 13 10:47:06 2007 From: forum-watir-users at openqa.org (John) Date: Tue, 13 Mar 2007 09:47:06 CDT Subject: [Wtr-general] count specific links In-Reply-To: <38451005.1173792572339.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <59375999.1173797256755.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi Adam, That's brilliant, it works just the way I want. Thanks! John --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6867&messageID=19781#19781 From paul.rogers at shaw.ca Tue Mar 13 11:53:26 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 13 Mar 2007 09:53:26 -0600 Subject: [Wtr-general] count specific links In-Reply-To: <36B5DBA88E027F47812ED877C6A978D8035029@rc-mail.relocationcentral.com> References: <38451005.1173792572339.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <36B5DBA88E027F47812ED877C6A978D8035029@rc-mail.relocationcentral.com> Message-ID: the iterators ( links, buttons etc) mixes in enumerable, so you should be able to do this ( untested though ) matching_links = ie.links.grep(/google/{|l| l.href } should put all the link objects whose href matches /google/ into the matching_links array Paul ----- Original Message ----- From: Adam Reed Date: Tuesday, March 13, 2007 8:09 am Subject: Re: [Wtr-general] count specific links > John, > I've done this in the past by grabbing all the links of a > certain type and storing them to an array. Then, with your random > number variable (let's call it "n"), you can just do ArrayName(n) to > grab one. For instance: > > ## For each link $ie finds, do the following: Take my Array, and > add the href address of each link if and only if the address looks > like"http://www.google.com". > > > hrefs = Array.new > url = "http://www.google.com" > > ie.links.each do |link| > hrefs << link.href if /(#{url})/ =~ link.href > end > > > ## Then, using .length, you can grab the length of your Array and > use it as your random number endpoint. > > > length = hrefs.length #grab the length > random = rand(length) #set a random number up to that > link > > newlink = href[random] #set the link choice to the > variable newlink > > ie.goto newlink #go to it! > > > The above code can be simplified into two lines or so, but I > wanted you > to be able to see what I was doing. > > Hope that helps! > > Thanks, > > Adam Reed > QA Engineer > CORT Business Services > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of John > Sent: Tuesday, March 13, 2007 8:29 AM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] count specific links > > Hi, > > I want to count all links in the page which have "catalog/tree" in > theirurl and then click one randomly. I know how to generate a > random number, > but how can I count the number of links? > > Thanks! > John > ------------------------------------------------------------------- > -- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6867&messageID=19777#19777 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From charley.baker at gmail.com Tue Mar 13 12:50:52 2007 From: charley.baker at gmail.com (Charley Baker) Date: Tue, 13 Mar 2007 09:50:52 -0700 Subject: [Wtr-general] Question regarding buttonmenu In-Reply-To: References: Message-ID: Some html sample code would be helpful. -c On 3/13/07, Mathew Jacob wrote: > > Hi, > > > > I have one scenario that buttonmenu and two items in that buttonmenu. > What is the command to select item in buttonmenu. Please guide me. > > > > Regards, > > > > Mathew > > > > > > * * > > > *Ya**ho**o India, EGL, Bangalore ? 71, Phone:+91-80-30516346, > Mobile:+91-9945849925* > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070313/d7a56d6c/attachment.html From charley.baker at gmail.com Tue Mar 13 12:56:54 2007 From: charley.baker at gmail.com (Charley Baker) Date: Tue, 13 Mar 2007 09:56:54 -0700 Subject: [Wtr-general] Is there a global variable to control the scripts execution speed In-Reply-To: <45F68BD0.5050105@comcast.net> References: <32119385.1173547904164.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <45F68BD0.5050105@comcast.net> Message-ID: wait_until(120) { ie.button(:value, 'click me').exists?} This'll poll for 120 seconds as opposed to the default 60. -Charley On 3/13/07, ftorres10 at comcast.net wrote: > > Charley > How do you change the time out ? > Thanks. > > Charley Baker wrote: > > There's not an execution control variable, but instead of sleep which > > is unreliable, the best bet when using Watir 1.5 is to use the > > wait_until method. > > > > For example, > > > > do something > > .... > > wait_until{ ie.button(:value, 'Click Me').exists?) # poll for some > > control to show up with defaults of timeout:60 seconds, poll every .5 > > seconds > > > > > > hth, > > > > Charley > > > > > > On 3/11/07, *Jason He* > > wrote: > > > > Dear all, > > Does watir/ruby provide a global configuration variable which > > could used to change the speed of execution, rather than add many > > "sleep" in each scripts. > > Regards, > > Jason > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070313/45cb56c5/attachment.html From charley.baker at gmail.com Tue Mar 13 14:59:03 2007 From: charley.baker at gmail.com (Charley Baker) Date: Tue, 13 Mar 2007 11:59:03 -0700 Subject: [Wtr-general] contract work in San Francisco In-Reply-To: <20070312234043.9BEFB5240B71@rubyforge.org> References: <20070312234043.9BEFB5240B71@rubyforge.org> Message-ID: I do believe I know the company and would highly recommend anyone interested checking it out. -c On 3/12/07, Bob wrote: > > National retailer has an immediate need for a test engineer with > experience in Ruby/WATiR. > > Work on a very high profile J2EE based Ecommerce effort. Lead type role, > involving mainly test automation. > > 6-9 months downtown. Calls or email are fine. > > > > Thanks, > > Bob > > > > Bob Lepesh > > JD Strategies > > a workforce solutions service > > 343 State St. Suite 202 > > Los Altos, Calif. 94022 > > T. 650.941.2900 > > F. 650.941.2933 > > bob at jdstrategies.net > > http:/www.jdstrategies.net > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070313/2e9671d5/attachment-0001.html From forum-watir-users at openqa.org Tue Mar 13 17:25:37 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Tue, 13 Mar 2007 16:25:37 CDT Subject: [Wtr-general] Problem automating Gmail Message-ID: <57488975.1173821179754.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello all, I'm writing some tests to test gmail and I'm having a slight problem clicking on the menu items to the right in a gmail window. Below is the script I am using. The problem is that I want to click on the text that says "Starred" right beneath Inbox but no matter if I use span.click or span.fireEvent("onClick") the click does not trigger an event. require 'rubygems' require 'watir' require 'test/unit' include Watir class TestCase < Test::Unit::TestCase def test_1 $IE0 = IE.new $IE0.goto("www.gmail.com") $IE0.text_field(:id, 'Email').set('enter_username_here') $IE0.text_field(:id, 'Passwd').set('enter_password_here') $IE0.button(:name, 'null').click #Click on "Starred" $IE0.frame(:name, "main").frame(:name, "v1").span(:id, "ds_starred").click end end Any help would be appreciated. Please fill in the username and password when running otherwise it wont work. Thanks. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6882&messageID=19812#19812 From forum-watir-users at openqa.org Wed Mar 14 01:55:30 2007 From: forum-watir-users at openqa.org (Bret Pettichord) Date: Wed, 14 Mar 2007 00:55:30 CDT Subject: [Wtr-general] Is there a global variable to control the scripts In-Reply-To: <45F68BD0.5050105@comcast.net> Message-ID: <54596021.1173851760149.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> $FAST_SPEED = true --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6874&messageID=19838#19838 From aquino.jet at gmail.com Wed Mar 14 02:09:26 2007 From: aquino.jet at gmail.com (Jet Aquino) Date: Wed, 14 Mar 2007 14:09:26 +0800 Subject: [Wtr-general] How to call different test cases??? Message-ID: Hi, I was wondering if you guys can help me out. I'm kinda lost in Watir particularly in calling other test cases. Can somebody give me a sample on how this can be done in Watir??? What I mean is i want to make a general or a main script that will call other scripts and execute them. Sample: Main.rb contains the codes that will call other scripts like login.rb, compute.rb, logout.rb. Can anybody give me a sample for this??? I appreciate all your help guys. Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070314/1d595264/attachment.html From forum-watir-users at openqa.org Wed Mar 14 03:57:54 2007 From: forum-watir-users at openqa.org (John) Date: Wed, 14 Mar 2007 02:57:54 CDT Subject: [Wtr-general] What are people using for 'test executive'? In-Reply-To: <35346245.1167960135003.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <43795106.1173859104141.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> We use Mercury Quality Center as test management tool and WinRunner for executing the tests. Obviously this is all well integrated. We now want to switch from WinRunner to Watir, but still be able to run the tests from Quality Center. I know this is possible with the custom test type of QC, but I'm confused about how to do this exactly. Does anyone have any experience with this or can point me in the right direction? Thanks! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6009&messageID=19841#19841 From forum-watir-users at openqa.org Wed Mar 14 04:43:55 2007 From: forum-watir-users at openqa.org (san) Date: Wed, 14 Mar 2007 03:43:55 CDT Subject: [Wtr-general] Why file_field Is Not Working With Watir 1.5 Message-ID: <40391231.1173861865331.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> require 'watir' include Watir ie = IE.new ie.goto('www.rapidshare.com') ie.file_field(:name,"filecontent").set('c:\\123.xls') I Don't Know Why Its Not Working...? The Programs Goes To Rapidshare & Exits Normally.... No warnings Or Anything Like Autoit Is Not Registered Or Something Else, But Nothing Happnes... Any Ideas, Thanks In Advance. :) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6888&messageID=19843#19843 From forum-watir-users at openqa.org Wed Mar 14 05:11:43 2007 From: forum-watir-users at openqa.org (san) Date: Wed, 14 Mar 2007 04:11:43 CDT Subject: [Wtr-general] Why file_field Is Not Working With Watir 1.5 In-Reply-To: <40391231.1173861865331.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <63429282.1173863533470.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> And Its Giving The Following Error With watir-1.5.1.1158: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1830:in `method_missing': document (WIN32OLERuntimeError) OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1830:in `wait' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1829:in `times' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1829:in `wait' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1693:in `goto' from UploadPicture.rb:15 Is There Any Solution... --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6888&messageID=19844#19844 From forum-watir-users at openqa.org Wed Mar 14 07:22:17 2007 From: forum-watir-users at openqa.org (John) Date: Wed, 14 Mar 2007 06:22:17 CDT Subject: [Wtr-general] Unable to load watir/contrib/enabled_popup Message-ID: <41293300.1173871367225.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, Probably a newbie question, but when I use this in my script: require 'watir/contrib/enabled_popup' then I get an error: c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_re quire': no such file to load -- watir/contrib/enabled_popup (LoadError) What am I doing wrong? Thanks, John --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6890&messageID=19851#19851 From areed at relocationcentral.com Wed Mar 14 08:46:29 2007 From: areed at relocationcentral.com (Adam Reed) Date: Wed, 14 Mar 2007 07:46:29 -0500 Subject: [Wtr-general] Is there a global variable to control the scripts In-Reply-To: <54596021.1173851760149.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <45F68BD0.5050105@comcast.net> <54596021.1173851760149.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36B5DBA88E027F47812ED877C6A978D803502F@rc-mail.relocationcentral.com> I guess this replaces the browser.set_fast_speed setting? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, March 14, 2007 12:56 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Is there a global variable to control the scripts $FAST_SPEED = true --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6874&messageID=19838#19838 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From forum-watir-users at openqa.org Wed Mar 14 08:56:17 2007 From: forum-watir-users at openqa.org (udof) Date: Wed, 14 Mar 2007 07:56:17 CDT Subject: [Wtr-general] What are people using for 'test executive'? In-Reply-To: <35346245.1167960135003.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <35027834.1173877138636.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> We use FitNesse from www.fitnesse.org to store and execute our tests. Its basically a wiki to store tests. The tests are expessed in form of tables. We dropped Watir in favour of Selenium and use Java instead of ruby to write the adapter/fixture between selenium and FitNesse. But FitNesse has a ruby testrunner too. Udo --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6009&messageID=19854#19854 From mrussell at inpses.co.uk Wed Mar 14 09:14:48 2007 From: mrussell at inpses.co.uk (Max Russell) Date: Wed, 14 Mar 2007 13:14:48 -0000 Subject: [Wtr-general] ruby 1.8.6 Message-ID: Any early birds tried this out? If so, have any changes had an impact on Watir? I'm a bit of a lurker when it comes to upgrading (comes from too many times of totaling my Ubuntu system..) Max Russell Test Analyst. INPS Tel: 01382 223900 Fax: 01382 204488 Visit our Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of In Practice Systems Limited or any of its affiliates. If you are not the intended recipient please contact is.helpdesk at inps.co.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070314/ecba756d/attachment.html From forum-watir-users at openqa.org Wed Mar 14 09:44:05 2007 From: forum-watir-users at openqa.org (Jim Hollcraft) Date: Wed, 14 Mar 2007 08:44:05 CDT Subject: [Wtr-general] Simulate Right Click Open in New Window Message-ID: <42829281.1173879895089.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Is there an "easy" way to simulate a user right clicking a link and then choosing "Open in New Window?" Grabbing the url of a link and opening a new window with it looks slightly different to the server -- I think that at least the referrer in the header is blank in this case. I'm not sure what else might be different. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6893&messageID=19866#19866 From zeljko.filipin at gmail.com Wed Mar 14 10:17:34 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Wed, 14 Mar 2007 15:17:34 +0100 Subject: [Wtr-general] Unable to load watir/contrib/enabled_popup In-Reply-To: <41293300.1173871367225.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <41293300.1173871367225.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Do you have watir 1.5 or 1.4? -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070314/38694e70/attachment-0001.html From zeljko.filipin at gmail.com Wed Mar 14 10:23:12 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Wed, 14 Mar 2007 15:23:12 +0100 Subject: [Wtr-general] How to call different test cases??? In-Reply-To: References: Message-ID: On 3/14/07, Jet Aquino wrote: > > Main.rb contains the codes that will call other scripts like login.rb, > compute.rb, logout.rb. > Put this in Main.rb require "login" require "compute" require "logout" -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070314/3dee0026/attachment.html From forum-watir-users at openqa.org Wed Mar 14 10:23:00 2007 From: forum-watir-users at openqa.org (Jim Hollcraft) Date: Wed, 14 Mar 2007 09:23:00 CDT Subject: [Wtr-general] Windows 2003 64-bit and IE.new_process Fails In-Reply-To: <45D5FBFE.9020703@pettichord.com> Message-ID: <57779745.1173882311145.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> "can't convert String into Integer" trying to execute Win32API.new in the below code from ie-new-process.rb: module Watir def self.process_id_from_hwnd hwnd pid_info = ' ' * 32 Win32API.new("user32", "GetWindowThreadProcessId", 'ip', 'i'). call(hwnd, pid_info) process_id = pid_info.unpack("L")[0] end --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6573&messageID=19870#19870 From charley.baker at gmail.com Wed Mar 14 10:53:15 2007 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 14 Mar 2007 07:53:15 -0700 Subject: [Wtr-general] ruby 1.8.6 In-Reply-To: References: Message-ID: Watir's modal_dialog works with Ruby 1.8.2 only currently. Otherwise, everything else should work fine. -Charley On 3/14/07, Max Russell wrote: > > Any early birds tried this out? If so, have any changes had an impact on > Watir? > > > > I'm a bit of a lurker when it comes to upgrading (comes from too many > times of totaling my Ubuntu system..) > > > > *Max Russell* > > *Test Analyst.* > > *INPS* > > * * > > *Tel: 01382 223900* > > *Fax: 01382 204488* > > * * > > *Visit our Web site at www.inps.co.uk* > > * * > > *The information in this internet email is confidential and is intended > solely for the addressee. Access, copying or re-use of information in it by > anyone else is not authorised. Any views or opinions presented are solely > those of the author and do not necessarily represent those of In Practice > Systems Limited or any of its affiliates. If you are not the intended > recipient please contact is.helpdesk at inps.co.uk* > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070314/7aee0e6d/attachment.html From christopher.mcmahon at gmail.com Wed Mar 14 11:36:59 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 14 Mar 2007 09:36:59 -0600 Subject: [Wtr-general] How to call different test cases??? In-Reply-To: References: Message-ID: <72799cd70703140836r1906ed5gf883ce5846d5d61b@mail.gmail.com> There is a good discussion of this on p. 159-160 of "Programming Ruby". (Second edition). If you spend any significant time with Ruby, having this book is really important. -Chris On 3/14/07, Jet Aquino wrote: > Hi, > > I was wondering if you guys can help me out. I'm kinda lost in Watir > particularly in calling other test cases. Can somebody give me a sample on > how this can be done in Watir??? > > What I mean is i want to make a general or a main script that will call > other scripts and execute them. > > Sample: > > Main.rb contains the codes that will call other scripts like login.rb, > compute.rb, logout.rb. > > Can anybody give me a sample for this??? > > I appreciate all your help guys. > > Thanks in advance. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Wed Mar 14 12:00:41 2007 From: forum-watir-users at openqa.org (Mark) Date: Wed, 14 Mar 2007 11:00:41 CDT Subject: [Wtr-general] Identifying Correct column from multiple header row that spans cells? Message-ID: <42266629.1173888282615.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi all, Thanks for any help you can give... this has been bugging me for a while. I have a table that has 2 rows that are used for column headings. However, some cells span more than one cell. This results in the incorrect calculation of the column. Instead of using a "hard coded" index value, I am using a method that finds the column by heading text and then uses that as the index to reference the cell. This way if I add or delete columns my code wont break. But because the header row is made of 2 rows not 1, and the cells might span more than 1 cell, the calculation is wrong. EG: row1 header: 4 cells - "ID", "Desc", "Cost", "Savings" row2 header: 4 cells - "", "Album Title", "Artist", "Year", "Format", "", "" in header row2, "Description" spans several cells: "Album Title", "Artist", "Year", "Format" Data row: 7 cells - "ID", "Album Title", "Artist", "Year", "Format", "Cost", "Savings" So the data row contains a total of 7 columns. And If i look for "Cost" it will give me an index of 3, but when I use that index to get my value I get the "Artist" cell value. I tried getting column_count() but each row returns 4, so that is not helping. Here is code for my Find column index. It returns column index or nil if not found. def find_table_column(tableName, columnName) tableName = convertToRegex(tableName) columnName = convertToRegex(columnName) count = 0 col = nil t=@ie.tables.find { |t| t.text =~ /#{tableName}/ } header_row = t.rows.find { |r| r.text =~ /#{columnName}/ } if (header_row) header_row.each { |cell| count += 1 if ((cell ? cell.text : '') =~ /#{columnName}/i ) col = count end } end return col end EG 2: In the first example, it could be fixed by just replacing "Desc" with the 4 columns, but that is not available to me. In addition, i have tables that work the other way, several cells in the 1st row are spanned by 1 cell in the 2nd row. So a solution should cover both these cases. Thanks again for any input. Qaos! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6897&messageID=19883#19883 From bbutton at agilestl.com Wed Mar 14 12:53:15 2007 From: bbutton at agilestl.com (Brian Button) Date: Wed, 14 Mar 2007 11:53:15 -0500 Subject: [Wtr-general] Consistent browser lockup when running watir tests Message-ID: <45F8287B.8070807@agilestl.com> Hi, all, We have a bunch of watir tests written, using the newest version of watir, and we're seeing several of them locking up in the same places each time they're run. The symptoms are that the browser starts trying to connect to our page, and it just hangs there never actually connecting. If you kill the browser window, you get one of the stack traces below. Our site is high javascript/ajax based, if that could contribute to this problem. Any ideas about what we're doing wrong would be really appreciated! Here is the first method that we're calling where the problem is happening: def do_quick_search_for(quick_search_type_text, quick_search_by_text, quick_search_criteria_text) @ie.select_list(:name, "QuickSearchCriteria").select(quick_search_type_text) @ie.select_list(:name , "QuickSearchSecondaryCriteria").select(quick_search_by_text) @ie.text_field(:name, "TextCriteria").set(quick_search_criteria_text) @ie.button(:id, "quickSearchSubmitButton").click end and the stack trace (line 111 corresponds to the top line of above method) 1) Error: test_page_layout(UAT122OnBoardAmenitiesTest): WIN32OLERuntimeError: unknown property or method `document' HRESULT error code:0x80010108 The object invoked has disconnected from its clients. c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1780:in method_missing' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1780:in `document' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1113:in `ole_inner_elements' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1184:in `locate_input_element' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:3719:in `locate' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:2414:in `assert_exists' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:3773:in `select_item_in_select_list' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:3757:in `select' C:/Projects/sothebys/SIROffices.UATs/Watir Tests/Iteration 9/../sotheby_actions.rb:111:in `do_quick_search_for' C:/Projects/sothebys/SIROffices.UATs/Watir Tests/Iteration 9/UAT122_test.rb:11:in `test_page_layout' and the second: @ie.goto(@site_root) causes this stack trace: 1) Error: test_page_layout(UAT122OnBoardAmenitiesTest): WIN32OLERuntimeError: unknown property or method `readyState' HRESULT error code:0x80010108 The object invoked has disconnected from its clients. c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1811:in `method_missing' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1811:in `wait' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1693:in `goto' Thanks! bab -- Brian Button bbutton at agilestl.com VP Engineering http://www.agilestl.com Asynchrony Solutions http://oneagilecoder.agilestl.com St. Louis, MO 636.399.3146 Extreme Programming in St Louis - http://groups.yahoo.com/group/xpstl -- Brian Button bbutton at agilestl.com VP Engineering http://www.agilestl.com Asynchrony Solutions http://oneagilecoder.agilestl.com St. Louis, MO 636.399.3146 Extreme Programming in St Louis - http://groups.yahoo.com/group/xpstl From forum-watir-users at openqa.org Wed Mar 14 14:17:47 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Wed, 14 Mar 2007 13:17:47 CDT Subject: [Wtr-general] http_error_checker on IE7 In-Reply-To: Message-ID: <37562498.1173896297977.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Charley and Paul, I'm running the latest gem and trying to use the navigation checker with IE7, however, the code that was committed does not work. The get the following error: 1) Error: test_1(TestCase): WIN32OLERuntimeError: navigator OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1217:in `method_missing' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1217:in `check_for_http_error' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir/contrib/page_checker.rb:26 C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1849:in `call' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1849:in `run_error_checks' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1849:in `each' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1849:in `run_error_checks' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1838:in `wait' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1692:in `goto' http_errors.rb:12:in `test_1' and the problem is on the following line: n = self.document.invoke('parentWindow').navigator.appVersion it appears that navigator is the missing method so this line throws and error. Do you guys know of any work around? Thanks. -Bach --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6349&messageID=19888#19888 From forum-watir-users at openqa.org Wed Mar 14 14:23:04 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Wed, 14 Mar 2007 13:23:04 CDT Subject: [Wtr-general] Identifying Correct column from multiple header row that spans cells? In-Reply-To: <42266629.1173888282615.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <60682780.1173896614276.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I have no idea if this will help you, i wrote it awhile ago and it still works for me. I ripped out as much app specific junk as i could :) look at 'multi_find' and work your way down. Its not exactly what you want but might give you ideas. "find_value" would be values in rows, "find_type" would be values in the header. Also of note, this is note pretty, and has all sorts of hacky bits in it ;) # beware of dog class Support_Grid_Search def initialize()#stuff removed @base_table = ''#this would be specific to your app # Error value 'constant' @error = -1 end def find( find_value, find_type ) if grid_find(find_value, find_type) == @error return( generic_find( find_value, find_type, 'find' ) ) else return( true ) end end # Multi find DOES NOT SUPPORT GENERIC FIND - deal with it def multi_find( find_value_a, find_type_a, find_value_b, find_type_b ) if multi_grid_find( find_value_a, find_type_a, find_value_b, find_type_b ) == @error return( false ) else return( true ) end end def multi_grid_find( find_value_a, find_type_a, find_value_b, find_type_b ) # Locate both of the header columns cell_a = find_in_row(1,1,find_type_a) cell_b = find_in_row(1,1,find_type_b) if cell_a == @error or cell_b == @error # 'generic' search return( @error ) end # BOTH values have to match in a row, this is annoying O_o row_count = @base_table.row_count() for row in (2..row_count) found_row = find_in_column(cell_a,row,find_value_a) if found_row == @error return( @error ) else result_cell = find_in_row(found_row,1,find_value_b) if result_cell != @error return( found_row ) end end end end # multi means multiple values in the row, not rows to check def multi_click( find_value_a, find_type_a, find_value_b, find_type_b ) row = multi_grid_find( find_value_a, find_type_a, find_value_b, find_type_b ) if row == @error @logger.log('unable to find row to check') else @base_table[row].click end end def check( find_value, find_type ) if grid_check(find_value, find_type) == @error return( generic_find( find_value, find_type, 'check' ) ) else return( true ) end end def grid_check(find_value, find_type) row = grid_find(find_value, find_type) if row == @error return( row ) else @base_table[row][1].span(:index,1).checkbox(:index,1).set() return( row ) end end def grid_find(find_value, find_type) # Figure out how many rows there are in the table row_count = @base_table.row_count() # If theres only one the grid is empty if row_count == 1 @logger.log('nothing to search') return( @error ) end # Search the 'header' row, figure out what cell (column) contains the data we want cell = find_in_row(1,1,find_type) # Skip it if you can't find it if cell == @error @logger.log('no column of type: ' + find_type) return( @error ) end # Now search down the column and return the results return( find_in_column(cell,2,find_value) ) end def find_in_row(row,start_cell,find_value) cell_count = @base_table.column_count(row) for cell in start_cell..cell_count @base_table[row][cell].flash(1) if @base_table[row][cell].text.gsub(/\r\n/, " ").include? find_value return cell end end return @error end def find_in_column(cell,start_row,find_value) row_count = @base_table.row_count() for row in start_row..row_count begin @base_table[row][cell].flash(1) if @base_table[row][cell].text.include? find_value return row end rescue # it seems the row_count is wrong, so just skip the bad rows end end return @error end def generic_find( find_value, find_type, find_or_check ) # REMOVED, too specific end end --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6897&messageID=19889#19889 From paul.rogers at shaw.ca Wed Mar 14 14:35:25 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 14 Mar 2007 12:35:25 -0600 Subject: [Wtr-general] http_error_checker on IE7 In-Reply-To: <37562498.1173896297977.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <37562498.1173896297977.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: what site are you running against? the access denied is usually becasue of a frame issue Paul ----- Original Message ----- From: Bach Le Date: Wednesday, March 14, 2007 12:17 pm Subject: Re: [Wtr-general] http_error_checker on IE7 > Charley and Paul, I'm running the latest gem and trying to use the > navigation checker with IE7, however, the code that was committed > does not work. > > The get the following error: > > 1) Error: > test_1(TestCase): > WIN32OLERuntimeError: navigator > OLE error code:80070005 in > Access is denied. > > > HRESULT error code:0x80020009 > Exception occurred. > C:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir.rb:1217:in `method_missing' > C:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir.rb:1217:in `check_for_http_error' > C:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir/contrib/page_checker.rb:26 > C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1849:in > `call' C:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir.rb:1849:in `run_error_checks' > C:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir.rb:1849:in `each' > C:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir.rb:1849:in `run_error_checks' > C:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir.rb:1838:in `wait' > C:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir.rb:1692:in `goto' > http_errors.rb:12:in `test_1' > > > and the problem is on the following line: > > n = self.document.invoke('parentWindow').navigator.appVersion > > > it appears that navigator is the missing method so this line > throws and error. Do you guys know of any work around? Thanks. > > > -Bach > ------------------------------------------------------------------- > -- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6349&messageID=19888#19888 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Wed Mar 14 14:53:58 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Wed, 14 Mar 2007 13:53:58 CDT Subject: [Wtr-general] http_error_checker on IE7 In-Reply-To: Message-ID: <51046719.1173898468496.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I just set up apache on my local machine and hit the localhost for a document that doesn't exist. I played around with it some more after I posted that last message. I fired up IRB and issued the command that way and it worked. So i went back and ran my test and it works now. I don't know why it didn't work before. I'm gonna test it out on the 2003 machine again to see if i can pinpoint the problem. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6349&messageID=19891#19891 From richard.conroy at gmail.com Wed Mar 14 15:19:41 2007 From: richard.conroy at gmail.com (Richard Conroy) Date: Wed, 14 Mar 2007 19:19:41 +0000 Subject: [Wtr-general] OT: Anyone using screen capture software to make WATIR tutorials? Message-ID: <511fa3a20703141219s1c72c960w7e47e0fe3b1c551c@mail.gmail.com> I thought it would be a straightforward process to record my screen activity as a way to train up some testers in our company. The advantages being that they could be tailored for our own products, and many of the people are distributed worldwide. Basically show an IRB session interacting with WATIR to illustrate the primary features. I tried Wink and Camstudio and I found the process to be anything but simple. No 'smart' encoding settings (you get blink-and-you-miss-it or takes-forever-to-encode). Too much trial and error involved in identifying a sweet spot between legibility and practical files sizes. Wink was doing okay even if it took me ages to get a decent result with it, but every time I used it, it would just choke every now and then, stalling IE and IRB. Has anyone any experience with these tools for making this kind of training material or is screen recording software something that you just have to pay for to get timely results? regards, Richard From forum-watir-users at openqa.org Wed Mar 14 15:21:10 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Wed, 14 Mar 2007 14:21:10 CDT Subject: [Wtr-general] http_error_checker on IE7 In-Reply-To: Message-ID: <39501144.1173900119985.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Paul, here are the steps i used to produce the problem 1. IRB 2. create new IE window which should goto about:blank 3. issue command "ie.document.invoke('parentWindow').navigator.appVersion 4. I do not get the error 5. call ie.goto('http://localhost/doesnotexist.html') and I get a HTTP 404 not found in the browser 6. call ie.document.invoke('parentWindow').navigator.appVersion This is where I get the error. It seems to work on every page except the error ones. I get the following error: 1) Error: test_1(TestCase): WIN32OLERuntimeError: navigator OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1216:in `method_missing' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1216:in `check_for_http_error' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir/contrib/page_checker.rb:26 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1845:in `call' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1845:in `run_error_checks' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1845:in `each' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1845:in `run_error_checks' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1834:in `wait' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1688:in `goto' http_error.rb:13:in `test_1' for this script: require 'rubygems' require 'watir' require 'test/unit' require 'watir/contrib/page_checker' include Watir class TestCase < Test::Unit::TestCase def test_1 ie = IE.new ie.add_checker(PageCheckers::NAVIGATION_CHECKER) ie.goto('http://localhost/doesnotexist.html') end end --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6349&messageID=19893#19893 From paul.rogers at shaw.ca Wed Mar 14 15:38:21 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 14 Mar 2007 13:38:21 -0600 Subject: [Wtr-general] http_error_checker on IE7 In-Reply-To: <39501144.1173900119985.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <39501144.1173900119985.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: there is probably no document available to get the navigator version from :-( I guess my simple way of doing this was too simple Paul ----- Original Message ----- From: Bach Le Date: Wednesday, March 14, 2007 1:21 pm Subject: Re: [Wtr-general] http_error_checker on IE7 > Paul, here are the steps i used to produce the problem > > 1. IRB > 2. create new IE window which should goto about:blank > 3. issue command > "ie.document.invoke('parentWindow').navigator.appVersion4. I do > not get the error > 5. call ie.goto('http://localhost/doesnotexist.html') and I get a > HTTP 404 not found in the browser > 6. call ie.document.invoke('parentWindow').navigator.appVersion > > > This is where I get the error. It seems to work on every page > except the error ones. > > I get the following error: > > 1) Error: > test_1(TestCase): > WIN32OLERuntimeError: navigator > OLE error code:80070005 in > Access is denied. > > > HRESULT error code:0x80020009 > Exception occurred. > c:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir.rb:1216:in `method_missing' > c:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir.rb:1216:in `check_for_http_error' > c:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir/contrib/page_checker.rb:26 > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1845:in > `call' c:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir.rb:1845:in `run_error_checks' > c:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir.rb:1845:in `each' > c:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir.rb:1845:in `run_error_checks' > c:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir.rb:1834:in `wait' > c:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1162/./watir.rb:1688:in `goto' > http_error.rb:13:in `test_1' > > > for this script: > > require 'rubygems' > require 'watir' > require 'test/unit' > require 'watir/contrib/page_checker' > > include Watir > > class TestCase < Test::Unit::TestCase > def test_1 > ie = IE.new > ie.add_checker(PageCheckers::NAVIGATION_CHECKER) > ie.goto('http://localhost/doesnotexist.html') > end > end > ------------------------------------------------------------------- > -- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6349&messageID=19893#19893 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Wed Mar 14 16:15:33 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Wed, 14 Mar 2007 15:15:33 CDT Subject: [Wtr-general] http_error_checker on IE7 In-Reply-To: Message-ID: <38325567.1173903363280.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Paul, do you know if it's possible to read the response headers from the server for a given page with IE? I've been looking around and I can't find any information on it. I'd be happy to write the code if someone can point me in the right direction. -Bach --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6349&messageID=19897#19897 From Mark_Cain at RL.gov Wed Mar 14 16:58:36 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Wed, 14 Mar 2007 13:58:36 -0700 Subject: [Wtr-general] http_error_checker on IE7 In-Reply-To: <38325567.1173903363280.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <38325567.1173903363280.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A3739@EX01-2.rl.gov> You might try a tool like Fiddler. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bach Le Sent: Wednesday, March 14, 2007 1:16 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] http_error_checker on IE7 Paul, do you know if it's possible to read the response headers from the server for a given page with IE? I've been looking around and I can't find any information on it. I'd be happy to write the code if someone can point me in the right direction. -Bach --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6349&messageID=19897#19897 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From rmarch at gmti.gannett.com Wed Mar 14 16:36:04 2007 From: rmarch at gmti.gannett.com (Marchionne, Robert) Date: Wed, 14 Mar 2007 16:36:04 -0400 Subject: [Wtr-general] I'm a little confused.. Message-ID: <0B95D939E63E82418FD04275C367B29E3DB04A@gmti-lclci01.us.ad.gannett.com> I'm a software QA person, and while I'm no programmer I consider myself to have some pretty good scripting skills. I like the idea of Watir, and have written a few test cases that work just great. I however am not having much luck moving beyond basics. The user forum, and FAQ sections of the openqa.org/water site are broken links, and I can find no advanced technique code examples... Any help? Robert Introducing test automation is sometimes like a romance: Stormy, emotional, resulting in either a spectacular flop or a spectacular success. -B. Bereza-Jarocinski, "Automated Testing In Daily Build", Swedish Engineering Inst. 2000 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070314/9dcacee8/attachment.html From Mark_Cain at RL.gov Wed Mar 14 17:13:19 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Wed, 14 Mar 2007 14:13:19 -0700 Subject: [Wtr-general] I'm a little confused.. In-Reply-To: <0B95D939E63E82418FD04275C367B29E3DB04A@gmti-lclci01.us.ad.gannett.com> References: <0B95D939E63E82418FD04275C367B29E3DB04A@gmti-lclci01.us.ad.gannett.com> Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A373A@EX01-2.rl.gov> Take a look at the unittests that are included in the Watir installation. There is just about anything you might want to do is represented in those tests or can be easily derived from them. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Marchionne, Robert Sent: Wednesday, March 14, 2007 1:36 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] I'm a little confused.. I'm a software QA person, and while I'm no programmer I consider myself to have some pretty good scripting skills. I like the idea of Watir, and have written a few test cases that work just great. I however am not having much luck moving beyond basics. The user forum, and FAQ sections of the openqa.org/water site are broken links, and I can find no advanced technique code examples... Any help? Robert Introducing test automation is sometimes like a romance: Stormy, emotional, resulting in either a spectacular flop or a spectacular success. -B. Bereza-Jarocinski, "Automated Testing In Daily Build", Swedish Engineering Inst. 2000 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070314/90c88fd5/attachment-0001.html From forum-watir-users at openqa.org Wed Mar 14 18:16:56 2007 From: forum-watir-users at openqa.org (Bret Pettichord) Date: Wed, 14 Mar 2007 17:16:56 CDT Subject: [Wtr-general] I'm a little confused.. In-Reply-To: <4440693B7CFF2440ABC2E0BE480DABA10A373A@EX01-2.rl.gov> Message-ID: <37458711.1173910646523.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> >The user > forum, and FAQ sections > of the openqa.org/water site are broken links Could you please provide details so we can fix them. Bret --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6900&messageID=19901#19901 From bret at pettichord.com Wed Mar 14 19:11:55 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 14 Mar 2007 18:11:55 -0500 Subject: [Wtr-general] Fwd: [openqa-admin] IE issues In-Reply-To: <97BFA162-E8F9-4030-8408-288F11BE7835@gmail.com> References: <97BFA162-E8F9-4030-8408-288F11BE7835@gmail.com> Message-ID: FYI ---------- Forwarded message ---------- From: Patrick Lightbody Date: Mar 14, 2007 5:59 PM Subject: [openqa-admin] IE issues To: admin at openqa.org All, If any of your users report or have reported issues with IE not working on parts of OpenQA, please let them know the problem is now resolved. I apologize about that. Geez... what OpenQA really needs is some cross-platform testing and monitoring ;) Patrick Patrick Lightbody Cell: 971-285-2704 Home: 503-488-5402 IM (GTalk): plightbo at gmail.com IM (AOL+Yahoo): PSquad32 --------------------------------------------------------------------- To unsubscribe, e-mail: admin-unsubscribe at openqa.org For additional commands, e-mail: admin-help at openqa.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070314/e5fb01f5/attachment.html From jeff.fry at gmail.com Wed Mar 14 19:24:16 2007 From: jeff.fry at gmail.com (Jeff Fry) Date: Wed, 14 Mar 2007 16:24:16 -0700 Subject: [Wtr-general] I'm a little confused.. In-Reply-To: <0B95D939E63E82418FD04275C367B29E3DB04A@gmti-lclci01.us.ad.gannett.com> References: <0B95D939E63E82418FD04275C367B29E3DB04A@gmti-lclci01.us.ad.gannett.com> Message-ID: <970956b0703141624i1b88465fkc2ec3916cbbdaf34@mail.gmail.com> On 3/14/07, Marchionne, Robert wrote: > > I'm a software QA person, and while I'm no programmer I consider myself > to have some pretty good scripting skills. I like the idea of Watir, and > have written a few test cases that work just great. I however am not having > much luck moving beyond basics. The user forum, and FAQ sections of the > openqa.org/water site are broken links, and I can find no advanced > technique code examples? > What sort of non-basic examples are you looking for? Depending on what you want to learn, Mark Cain's suggestion to read the unit tests is a very good one. You can find a bit here: http://wiki.openqa.org/display/WTR/Example+Test+Suites (though parts may be a bit aged) and here: http://wiki.openqa.org/display/WTR/Contributions and (if you'd like an example and explanation of dynamic method generation), in my blog, here: http://testingjeff.wordpress.com/ If you can be more specific about what you haven't found, folks here may be able to help more - I've found this to be a very generous community. Best of luck with Watir! Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070314/a8fadad8/attachment.html From paul.rogers at shaw.ca Thu Mar 15 00:16:06 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 14 Mar 2007 22:16:06 -0600 Subject: [Wtr-general] http_error_checker on IE7 References: <38325567.1173903363280.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <0ce301c766b8$a761ab40$6400a8c0@laptop> Im sure I came across something for this recently, but I cant remeber ( or find what) now. The best I came up with is to use the navigator object like this irb(main):015:0> ie.document.parentWindow.navigator.invoke('browserLanguage') => "en-us" you can see what properties/methods are available here http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_navigator.asp?frame=true Paul ----- Original Message ----- From: "Bach Le" To: Sent: Wednesday, March 14, 2007 2:15 PM Subject: Re: [Wtr-general] http_error_checker on IE7 > Paul, > do you know if it's possible to read the response headers from the server > for a given page with IE? I've been looking around and I can't find any > information on it. I'd be happy to write the code if someone can point me > in the right direction. > > -Bach > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6349&messageID=19897#19897 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Thu Mar 15 00:18:27 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 14 Mar 2007 22:18:27 -0600 Subject: [Wtr-general] Simulate Right Click Open in New Window References: <42829281.1173879895089.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <0cf201c766b8$fafa1ee0$6400a8c0@laptop> i think you can do it by ie.whatever().fire_event('onContextMenu') then use autoit to send the key sequence Paul ----- Original Message ----- From: "Jim Hollcraft" To: Sent: Wednesday, March 14, 2007 7:44 AM Subject: [Wtr-general] Simulate Right Click Open in New Window > Is there an "easy" way to simulate a user right clicking a link and then > choosing "Open in New Window?" Grabbing the url of a link and opening a > new window with it looks slightly different to the server -- I think that > at least the referrer in the header is blank in this case. I'm not sure > what else might be different. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6893&messageID=19866#19866 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From sw_latha at yahoo.com Thu Mar 15 02:06:48 2007 From: sw_latha at yahoo.com (swarna latha) Date: Wed, 14 Mar 2007 23:06:48 -0700 (PDT) Subject: [Wtr-general] Help on dropdown menu selection Message-ID: <701656.11784.qm@web56211.mail.re3.yahoo.com> Hi, "Mark" is a drop down button in a page with 2 options "Mark as Read" and "Mark as Unread". I am able to click on the Mark button by $ie.button.(:name, "top_bpress_topmark").click, but am unable to select the options. $ie.select_list(:name,"top_read_unread").select("Mark as Unread") results in undefined object method.. The relevant html of the page for your reference is#
Thanks, Swarna ____________________________________________________________________________________ Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070314/922c5ab2/attachment.html From zeljko.filipin at gmail.com Thu Mar 15 04:28:12 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 15 Mar 2007 09:28:12 +0100 Subject: [Wtr-general] Help on dropdown menu selection In-Reply-To: <701656.11784.qm@web56211.mail.re3.yahoo.com> References: <701656.11784.qm@web56211.mail.re3.yahoo.com> Message-ID: On 3/15/07, swarna latha wrote: > > $ie.select_list(:name,"top_read_unread").select("Mark as Unread") results > in undefined object method.. > I tried your watir code with your html and got Watir::Exception::NoValueFoundException: No option with text of Mark as Unread in this select element When I removed extra space from "Mark as Unread" (before "Unread") it worked. I could tell if that is your problem if you posted your exact error message. -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070315/af947635/attachment.html From sikander at marlabs.com Thu Mar 15 04:50:49 2007 From: sikander at marlabs.com (sikander) Date: Thu, 15 Mar 2007 14:20:49 +0530 Subject: [Wtr-general] How to read all text fields of a page and store it into an array Message-ID: <007701c766df$0a57e0e0$8521a8c0@caseshare.com> Hi, I have an array say arrayTextfield1 = [textfield1, textfield2, textfield3, textfield4, textfield5, textfield6] In a page i have following fields textfield1 textfield2 dropdown1 button1 textfield5 dropdown2 dropdown3 button3 Just i will create a array called arrayTextfield2=Array.new. Now I want to push all the text fields with their names into this array. And finally i want to compare these two arrays saying that arrayTextfield2 contains the textfields of arrayTextfield1 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070315/939f7d2f/attachment-0001.html From kevin at rutherford-software.co.uk Thu Mar 15 06:13:20 2007 From: kevin at rutherford-software.co.uk (Kevin Rutherford) Date: Thu, 15 Mar 2007 10:13:20 +0000 Subject: [Wtr-general] Watir can't find IEnum interface In-Reply-To: <54b09a6d0703090554i3ec194bbj74c100dafca47758@mail.gmail.com> References: <54b09a6d0703090554i3ec194bbj74c100dafca47758@mail.gmail.com> Message-ID: <54b09a6d0703150313i7f996168q1e75e28050f72d20@mail.gmail.com> Hi, Does anyone have any idea what's broken in my environment please? Many thanks, Kevin On 09/03/07, Kevin Rutherford wrote: > Hi, > I know this question has been asked before, but I didn't see a > resolution in the list archives... > > I have just installed Watir onto two different machines. On one, > everything works fine (and Watir's tests all pass). But on the other > I have a problem. Firstly, the Watir gem's tests don't pass: > > ERROR: 154 tests, 147 assertions, 40 failures, 84 errors > > (although there's no detail as to what assertions failed etc). Then > there's a problem when I run Watir itself. Here's an irb session to > illustrate: > > C:\...> irb > irb(main):001:0> require 'watir' > => true > irb(main):002:0> ie = Watir::IE.new > => # > irb(main):003:0> ie.goto 'http://google.com' > => 1.312 > irb(main):004:0> ie.show_all_objects > -----------Objects in page ------------- > RuntimeError: failed to get IEnum Interface > HRESULT error code:0x80004002 > No such interface supported > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1586:in > `each' > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1586:in > `show_all_objects' > from (irb):4 > > (The choice of URL in the goto() is irrelevant, btw.) Can anyone > suggest what's wrong? > Many thanks, > Kevin > -- > http://silkandspinach.net From sw_latha at yahoo.com Thu Mar 15 06:14:22 2007 From: sw_latha at yahoo.com (swarna latha) Date: Thu, 15 Mar 2007 03:14:22 -0700 (PDT) Subject: [Wtr-general] Help on dropdown menu selection Message-ID: <439235.6870.qm@web56212.mail.re3.yahoo.com> Hi ZeljkoFilipin, The extra space is not the issue(that was a typo). However, the error from the irbconsole is : irb(main):011:0> ie.select_list(:name,"top_read_unread").select("Mark as Read") Watir::Exception::UnknownObjectException: Unable to locate object, using name and top_read_unread from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2940:in `select_item_in_select_list' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2925:in `select' from (irb):11 what else could be wrong?... ------------------------------------------------------------------------------------------------------- "Mark" is a drop down button in a page with 2 options "Mark as Read" and "Mark as Unread". I am able to click on the Mark button by $ie.button.(:name, "top_bpress_topmark").click, but am unable to select the options. $ie.select_list(:name,"top_read_unread").select("Mark as Unread") results in undefined object method.. The relevant html of the page for your reference is#
____________________________________________________________________________________ Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070315/e15959ed/attachment.html From aquino.jet at gmail.com Thu Mar 15 09:07:38 2007 From: aquino.jet at gmail.com (Jet Aquino) Date: Thu, 15 Mar 2007 21:07:38 +0800 Subject: [Wtr-general] How to call different test cases??? In-Reply-To: <72799cd70703140836r1906ed5gf883ce5846d5d61b@mail.gmail.com> References: <72799cd70703140836r1906ed5gf883ce5846d5d61b@mail.gmail.com> Message-ID: Hi guys, Thanks for the response. I wasn't able to spend much time with it since i'm doing Watir only during my spare time. I'll dig deeper the next time. By the way, are there other great ebooks that you can suggest that could help me in understanding and creating complex automated scripts using Watir/Ruby??? Thanks in advance... Peace out. On 3/14/07, Chris McMahon wrote: > > There is a good discussion of this on p. 159-160 of "Programming > Ruby". (Second edition). If you spend any significant time with Ruby, > having this book is really important. > -Chris > > On 3/14/07, Jet Aquino wrote: > > Hi, > > > > I was wondering if you guys can help me out. I'm kinda lost in Watir > > particularly in calling other test cases. Can somebody give me a sample > on > > how this can be done in Watir??? > > > > What I mean is i want to make a general or a main script that will call > > other scripts and execute them. > > > > Sample: > > > > Main.rb contains the codes that will call other scripts like login.rb, > > compute.rb, logout.rb. > > > > Can anybody give me a sample for this??? > > > > I appreciate all your help guys. > > > > Thanks in advance. > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070315/f6a1a8aa/attachment.html From zeljko.filipin at gmail.com Thu Mar 15 09:18:19 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 15 Mar 2007 14:18:19 +0100 Subject: [Wtr-general] Help on dropdown menu selection In-Reply-To: <439235.6870.qm@web56212.mail.re3.yahoo.com> References: <439235.6870.qm@web56212.mail.re3.yahoo.com> Message-ID: On 3/15/07, swarna latha wrote: > > Watir::Exception::UnknownObjectException: Unable to locate object, using > name and top_read_unread > So this works. ie.button(:name, "top_bpress_topmark").click But this does not work? ie.select_list(:name,"top_read_unread").select("Mark as Read") ie.select_list(:name,"top_read_unread").select("Mark as Unread") What Watir version do you have? I tried it with 1.5.1.1158. Try if this code works only with this html snippet that you sent. Is that html in a frame? -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070315/c1a5767b/attachment.html From zeljko.filipin at gmail.com Thu Mar 15 09:26:05 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 15 Mar 2007 14:26:05 +0100 Subject: [Wtr-general] How to call different test cases??? In-Reply-To: References: <72799cd70703140836r1906ed5gf883ce5846d5d61b@mail.gmail.com> Message-ID: On 3/15/07, Jet Aquino wrote: > > are there other great ebooks > Start here (from Watir wiki): http://wiki.openqa.org/display/WTR/Learning+Ruby http://wiki.openqa.org/display/WTR/Articles -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070315/83772528/attachment.html From tester.paul at gmail.com Thu Mar 15 09:26:34 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 15 Mar 2007 09:26:34 -0400 Subject: [Wtr-general] How to read all text fields of a page and store it into an array In-Reply-To: <007701c766df$0a57e0e0$8521a8c0@caseshare.com> References: <007701c766df$0a57e0e0$8521a8c0@caseshare.com> Message-ID: <37c405480703150626i349e9e31v7541ecfd19a322bb@mail.gmail.com> What have you tried and where have you looked for the answers? On 15/03/07, sikander wrote: > > Hi, > > I have an array say arrayTextfield1 = [textfield1, textfield2, textfield3, > textfield4, textfield5, textfield6] > > In a page i have following fields > > textfield1 > textfield2 > dropdown1 > button1 > textfield5 > dropdown2 > dropdown3 > button3 > > Just i will create a array called arrayTextfield2=Array.new. Now I want to > push all the text fields with their names into this array. And finally i > want to compare these two arrays saying that arrayTextfield2 contains the > textfields of arrayTextfield1 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070315/5a9652a3/attachment.html From zeljko.filipin at gmail.com Thu Mar 15 10:07:32 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 15 Mar 2007 15:07:32 +0100 Subject: [Wtr-general] How to read all text fields of a page and store it into an array In-Reply-To: <007701c766df$0a57e0e0$8521a8c0@caseshare.com> References: <007701c766df$0a57e0e0$8521a8c0@caseshare.com> Message-ID: If you have you can see names of text fields irb(main):016:0> ie.text_fields.each {|text_field| puts text_field.name} one three => 0 you can put names in array irb(main):017:0> text_fields_names = [] => [] irb(main):018:0> ie.text_fields.each {|text_field| text_fields_names << text_field.name} => 0 irb(main):019:0> text_fields_names => ["one", "three"] you can see if that array is the same as you expected irb(main):020:0> expected_text_fields_names = ["one", "three"] => ["one", "three"] irb(main):021:0> expected_text_fields_names - text_fields_names => [] If you get empty array, then they are the same (not exactly, but works for this, for more information see http://www.ruby-doc.org/core/classes/Array.html#M002234). -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070315/6aa6d188/attachment-0001.html From aaronw at staffworkscanada.com Thu Mar 15 10:17:16 2007 From: aaronw at staffworkscanada.com (Aaron Walker) Date: Thu, 15 Mar 2007 10:17:16 -0400 Subject: [Wtr-general] WATIR and RoR positions available in Toronto Message-ID: <003b01c7670c$a23c2e70$4200a8c0@staffworkscanada.com> Hello WATIR and RoR users, My name is Aaron Walker and I am an I.T. recruiter here in Toronto. I have been in contact with a few companies looking for WATIR users and RoR developers. Most are located in the downtown area of Toronto. If you are anyone you know are interested in hearing about these opportunities please give me a call at the number below or send me an e-mail Thanks, Aaron Walker Account Consultant, I.T. Division StaffWorks Canada 1235 Bay St, Suite 905 416-927-7575 ext. 241 aaronw at staffworkscanada.com www.staffworkscanada.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070315/03d8c79d/attachment.html From christopher.mcmahon at gmail.com Thu Mar 15 11:55:13 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 15 Mar 2007 09:55:13 -0600 Subject: [Wtr-general] Watir can't find IEnum interface In-Reply-To: <54b09a6d0703150313i7f996168q1e75e28050f72d20@mail.gmail.com> References: <54b09a6d0703090554i3ec194bbj74c100dafca47758@mail.gmail.com> <54b09a6d0703150313i7f996168q1e75e28050f72d20@mail.gmail.com> Message-ID: <72799cd70703150855q51937b53ha474f46862979e65@mail.gmail.com> On 3/15/07, Kevin Rutherford wrote: > Hi, > Does anyone have any idea what's broken in my environment please? > Many thanks, > Kevin Different versions of Ruby maybe? BTW, there is detailed information about which tests didn't pass. I think it goes to STDERR, though, not STDOUT, so you might have sent it somewhere you can't see it. -C From christopher.mcmahon at gmail.com Thu Mar 15 12:10:31 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 15 Mar 2007 10:10:31 -0600 Subject: [Wtr-general] How to call different test cases??? In-Reply-To: References: <72799cd70703140836r1906ed5gf883ce5846d5d61b@mail.gmail.com> Message-ID: <72799cd70703150910l58091c37kdf3b3df472435954@mail.gmail.com> By the > way, are there other great ebooks that you can suggest that could help me in > understanding and creating complex automated scripts using Watir/Ruby??? I assume that you know that you get Programming Ruby (1st edition) when you install Ruby? It's in C:ruby/doc/ProgrammingRuby.chm. And it's all over the web, too. I've already recommended the 2nd Edition of that book. Also, the Pragmatic guys publish a couple of other books about Ruby that I like: Brian Marick's "Everyday Scripting with Ruby (for Teams, Testers, and You) is exceptionally good. http://www.pragmaticprogrammer.com/titles/bmsft/index.html Maik Schmidt's "Enterprise Integration with Ruby" is also quite good, although I personally think there are more efficient ways to do most of what Schmidt demonstrates. http://www.pragmaticprogrammer.com/titles/fr_eir/index.html The thing to remember as you crank up this stuff is that Watir is not intended to be an end-to-end test tool. Watir provides a way to drive your system via Internet Explorer, and that's all. It is incredibly powerful, though , when you add in the ability to manipulated databases, files, network protocols, parse text, use XML, etc. etc., all of which is done by Ruby itself, or by Ruby libraries other than Watir. Have fun! From kevin at rutherford-software.co.uk Thu Mar 15 12:16:32 2007 From: kevin at rutherford-software.co.uk (Kevin Rutherford) Date: Thu, 15 Mar 2007 16:16:32 +0000 Subject: [Wtr-general] Watir can't find IEnum interface In-Reply-To: <72799cd70703150855q51937b53ha474f46862979e65@mail.gmail.com> References: <54b09a6d0703090554i3ec194bbj74c100dafca47758@mail.gmail.com> <54b09a6d0703150313i7f996168q1e75e28050f72d20@mail.gmail.com> <72799cd70703150855q51937b53ha474f46862979e65@mail.gmail.com> Message-ID: <54b09a6d0703150916s22a30d64wda01376099a412a0@mail.gmail.com> Hi Chris, On 15/03/07, Chris McMahon wrote: > On 3/15/07, Kevin Rutherford wrote: > > Hi, > > Does anyone have any idea what's broken in my environment please? > > Many thanks, > > Kevin > > Different versions of Ruby maybe? Both machines running 1.8.5. Is Watir known to be broken on some versions??? > BTW, there is detailed information about which tests didn't pass. I > think it goes to STDERR, though, not STDOUT, so you might have sent it > somewhere you can't see it. Nop,e checked that. Besides, the irb session I pasted is verbatim. Is this likely to be a bug in my version of IE, ruby, watir, XP, ....? Thanks, Kevin From christopher.mcmahon at gmail.com Thu Mar 15 12:22:48 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 15 Mar 2007 10:22:48 -0600 Subject: [Wtr-general] Watir can't find IEnum interface In-Reply-To: <54b09a6d0703150916s22a30d64wda01376099a412a0@mail.gmail.com> References: <54b09a6d0703090554i3ec194bbj74c100dafca47758@mail.gmail.com> <54b09a6d0703150313i7f996168q1e75e28050f72d20@mail.gmail.com> <72799cd70703150855q51937b53ha474f46862979e65@mail.gmail.com> <54b09a6d0703150916s22a30d64wda01376099a412a0@mail.gmail.com> Message-ID: <72799cd70703150922q28eee389o45fd93a5aec2f77e@mail.gmail.com> > Nop,e checked that. Besides, the irb session I pasted is verbatim. Run the unit tests from the command line and check the output. At the *very end* of the entire run (that is, don't kill the process in the middle), you should have some "..." characters, some "F" characters, followed by the pass/fail summary, followed by diagnostic information. Post the diagnostic information here. From tester.paul at gmail.com Thu Mar 15 12:29:42 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 15 Mar 2007 12:29:42 -0400 Subject: [Wtr-general] OT: Regular Expression help Message-ID: <37c405480703150929v54890249u4b06cdebc13934c0@mail.gmail.com> Hi there. After several hours of looking at this problem, I've decided to ask for some help. Here's the problem: I have an input text file that has a series of values stored like this: "one" "1" "0.1234" "0" "4" "two" "3" "1.3333" "1" "0" ... I want the values in the 4th and 5th quotes on each line. I originally thought about dumping each line 'split' into an array and working with the array, but then I thought it might save me time if I could just figure out the regular expression to get the right values. I've read through an online Regular Expression tutorial, reviewed a few books, and downloaded two apps (PowerGREP and Regexile) to help me try and figure this out but so far no luck. Here's the line I started with: line =~ /^\"[^"]*"\t\"[^"]*"\t\"[^"]*"\t\"([^"]*)"\t\"([^"]*)"\t/ => Expect $1 and $2 to hold the values I want... the (bracketed) regex's - I tried switching the \t with \s but no luck - tried adding and removing extra backslashes around the quotes, but nothing - tried adding and removing all sorts of other characters but still can't get it to work. Can anyone help me figure out how to parse these input lines in a quick and efficient way? I wanted to avoid having to rely on arrays, but I'm ready to give up and use them right about now. Please let me know. Thanks in advance. Paul C. (P.S. the *actual* input file has something like 20 values on each line. If I can figure out the pattern above for the simplified input file, I'm sure I can apply it to the larger real input file.) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070315/ee0a9364/attachment.html From arkie at compli.com Thu Mar 15 12:58:58 2007 From: arkie at compli.com (Alan Ark) Date: Thu, 15 Mar 2007 11:58:58 -0500 Subject: [Wtr-general] OT: Regular Expression help In-Reply-To: <37c405480703150929v54890249u4b06cdebc13934c0@mail.gmail.com> References: <37c405480703150929v54890249u4b06cdebc13934c0@mail.gmail.com> Message-ID: Hi Paul. Just a few notes. The ?^? I believe is an anchor tag to the beginning of the line, so having a bunch of these probably caused some of your problems. Here?s a regex that I came up with. I used the ??? qualifier to make the regex non-greedy ? which probably would have been the next thing that you ran into. paul=~/\".*?\"\t\".*?\"\t\".*?\"\t\"(.*?)\"\t\"(.*?)\"/ I tested this real quick (below) and it looks to work irb(main):015:0> paul=File.open("C:/temp/paul.txt") => # irb(main):016:0> pop=paul.gets => "\"one\"\t\"1\"\t\" 0.1234\"\t\"0\"\t\"4\"\n" irb(main):017:0> pop=~/\".*?\"\t\".*?\"\t\".*?\"\t\"(.*?)\"\t\"(.*?)\"/ => 0 irb(main):018:0> $1 => "0" irb(main):019:0> $2 => "4" As an aside, what?s wrong with reading the line, then splitting it into an array? I think that would have been much more readable than using the regex soln. Regards -Alan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Carvalho Sent: Thursday, March 15, 2007 9:30 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] OT: Regular Expression help Hi there. After several hours of looking at this problem, I've decided to ask for some help. Here's the problem: I have an input text file that has a series of values stored like this: "one" "1" " 0.1234" "0" "4" "two" "3" "1.3333" "1" "0" ... I want the values in the 4th and 5th quotes on each line. I originally thought about dumping each line 'split' into an array and working with the array, but then I thought it might save me time if I could just figure out the regular expression to get the right values. I've read through an online Regular Expression tutorial, reviewed a few books, and downloaded two apps (PowerGREP and Regexile) to help me try and figure this out but so far no luck. Here's the line I started with: line =~ /^\"[^"]*"\t\"[^"]*"\t\"[^"]*"\t\"([^"]*)"\t\"([^"]*)"\t/ => Expect $1 and $2 to hold the values I want... the (bracketed) regex's - I tried switching the \t with \s but no luck - tried adding and removing extra backslashes around the quotes, but nothing - tried adding and removing all sorts of other characters but still can't get it to work. Can anyone help me figure out how to parse these input lines in a quick and efficient way? I wanted to avoid having to rely on arrays, but I'm ready to give up and use them right about now. Please let me know. Thanks in advance. Paul C. (P.S. the *actual* input file has something like 20 values on each line. If I can figure out the pattern above for the simplified input file, I'm sure I can apply it to the larger real input file.) -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.11/722 - Release Date: 3/14/2007 3:38 PM -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.11/722 - Release Date: 3/14/2007 3:38 PM -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070315/0c5cfe91/attachment-0001.html From christopher.mcmahon at gmail.com Thu Mar 15 13:17:39 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 15 Mar 2007 11:17:39 -0600 Subject: [Wtr-general] OT: Regular Expression help In-Reply-To: <37c405480703150929v54890249u4b06cdebc13934c0@mail.gmail.com> References: <37c405480703150929v54890249u4b06cdebc13934c0@mail.gmail.com> Message-ID: <72799cd70703151017l3aea9fb9q637fb8ee46ca8f32@mail.gmail.com> Here's kind of a dumb way to do it, but it might give you some ideas: ################# data = '"one" "1" " 0.1234" "0" "4"' puts data string1 = data =~ /\d"$/ puts $& val1 = $&[0..0] string2 = data =~ /\d"\s+"\d"$/ puts $& val2 = $&[0..0] puts puts val1 puts val2 ############################################# On 3/15/07, Paul Carvalho wrote: > Hi there. After several hours of looking at this problem, I've decided to > ask for some help. > > Here's the problem: I have an input text file that has a series of values > stored like this: > "one" "1" " 0.1234" "0" "4" > "two" "3" "1.3333" "1" "0" > ... > > I want the values in the 4th and 5th quotes on each line. I originally > thought about dumping each line 'split' into an array and working with the > array, but then I thought it might save me time if I could just figure out > the regular expression to get the right values. > > I've read through an online Regular Expression tutorial, reviewed a few > books, and downloaded two apps (PowerGREP and Regexile) to help me try and > figure this out but so far no luck. > > Here's the line I started with: > line =~ > /^\"[^"]*"\t\"[^"]*"\t\"[^"]*"\t\"([^"]*)"\t\"([^"]*)"\t/ > > => Expect $1 and $2 to hold the values I want... the (bracketed) regex's > > - I tried switching the \t with \s but no luck > - tried adding and removing extra backslashes around the quotes, but nothing > - tried adding and removing all sorts of other characters but still can't > get it to work. > > Can anyone help me figure out how to parse these input lines in a quick and > efficient way? I wanted to avoid having to rely on arrays, but I'm ready to > give up and use them right about now. > > Please let me know. Thanks in advance. Paul C. > > (P.S. the *actual* input file has something like 20 values on each line. If > I can figure out the pattern above for the simplified input file, I'm sure I > can apply it to the larger real input file.) > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From tester.paul at gmail.com Thu Mar 15 13:25:56 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 15 Mar 2007 13:25:56 -0400 Subject: [Wtr-general] OT: Regular Expression help In-Reply-To: References: <37c405480703150929v54890249u4b06cdebc13934c0@mail.gmail.com> Message-ID: <37c405480703151025l20e22cbeya65c8210eaef6d6a@mail.gmail.com> On 15/03/07, Alan Ark wrote: > > Hi Paul. > > Just a few notes. > > Here's a regex that I came up with. > > I used the "?" qualifier to make the regex non-greedy ? which probably > would have been the next thing that you ran into. > Hi Alan, thanks for the reply. Your regex string does work in IRB but still doesn't produce any results in the regex tools I downloaded. (stupid tools.) As an aside, what's wrong with reading the line, then splitting it into an > array? > > I think that would have been much more readable than using the regex soln. > > Regards > > -Alan > I'm thinking about going with the array solution the more I think about it. Since the actual input lines have about 20 values each, the regex just gets longer and uglier and harder to understand. I thought I would give Regular Expressions a try since I don't use them very often. I think this is one of those times when it is *not* the optimal choice for readability and maintenance! Thanks for the feedback. Cheers. Paul C. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070315/8d7527c0/attachment.html From David_Brown at mentor.com Thu Mar 15 13:38:34 2007 From: David_Brown at mentor.com (Brown, David) Date: Thu, 15 Mar 2007 10:38:34 -0700 Subject: [Wtr-general] Re-Usable Load Testing Example using Watir. In-Reply-To: Message-ID: <44B054F46C2E4E4996C27D92F9B825EE04C4AC6E@SVR-ORW-EXC-07.mgc.mentorg.com> FYI - I've published a Re-Usable Load Testing Example under the Contributions section of the openqa watir website which demonstrates how to execute watir scripts concurrently to generate load and gather some basic performance testing metrics. http://wiki.openqa.org/display/WTR/Re-Usable+Load+Testing+Example -David Brown From charley.baker at gmail.com Thu Mar 15 14:24:05 2007 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 15 Mar 2007 12:24:05 -0600 Subject: [Wtr-general] Re-Usable Load Testing Example using Watir. In-Reply-To: <44B054F46C2E4E4996C27D92F9B825EE04C4AC6E@SVR-ORW-EXC-07.mgc.mentorg.com> References: <44B054F46C2E4E4996C27D92F9B825EE04C4AC6E@SVR-ORW-EXC-07.mgc.mentorg.com> Message-ID: Nice work. We're starting to get some pretty good user contributions. -Charley On 3/15/07, Brown, David wrote: > > FYI - > I've published a Re-Usable Load Testing Example under the Contributions > section of the openqa watir website which demonstrates how to execute > watir scripts concurrently to generate load and gather some basic > performance testing metrics. > > http://wiki.openqa.org/display/WTR/Re-Usable+Load+Testing+Example > > -David Brown > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070315/080d8f98/attachment.html From bret at pettichord.com Thu Mar 15 14:40:06 2007 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 15 Mar 2007 13:40:06 -0500 Subject: [Wtr-general] OpenQA issues Message-ID: If you have problems with the OpenQA website, including Jira, Confluence (the wiki) and the Forums, you should contact our host Patrick Lightbody < plightbo at gmail.com>. There is also a mailing list (but not a forum) for discussing these issues. It is admin at openqa.org and you can join by sending an email to admin-subscribe at openqa.org. Patrick does not read this forum. In the past, Charley and I have alerted Patrick when we've seen problems or problem reports, but both of us have been busy lately and some problems have gone on for a while without being brought to Patrick's attention. We could use some more volunteers to help with this. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070315/f87f16f4/attachment.html From john.lloydjones at gmail.com Thu Mar 15 17:38:47 2007 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Thu, 15 Mar 2007 14:38:47 -0700 Subject: [Wtr-general] Tables nested in a div Message-ID: <6fcd26f10703151438s48a9c399u774b9240ba18f032@mail.gmail.com> I have a tricky page where I need to click on a a menu that has been implemented as a table. There are many such menus and I can find the surrounding div (by id), but there is no other way to find the table (it doesn't have a predictable index, for example). So what I want is to ask the Div for the table -- where it is in fact, the only nested table). E.g. menu = mainFrame.div(:id, "menuId") menuTable = menu.table(:index, 1) menuTable[ 4 ][ 1 ].click Alas, this doesn't work out of the box -- Watir assumes that you always want to find tables nested in the document, so it errors out on menu.table() saying that there is no document. As tables are commonly nested in divs, and as far as I can see, adding a table method to the Div class wouldn't break any current code, is there any reason why Div couldn't do something like this? class Watir::Div def table( how, what ) if how == :index @o.getElementsByTagName( 'table' )[what.to_s] Table.new(@ieController, :from_object, table) else super.table( how, what ) end end end The table method overrides the super class for :index, but not for :id (which should be unique, so it doesn't need special handling). It certainly does make the code snipped abpve work. I haven't done any exhaustive tests to see if it breaks anything, but I can't think of any scenario where it could. John -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070315/cfa3474b/attachment.html From Jason.He at resilience.com Fri Mar 16 05:14:54 2007 From: Jason.He at resilience.com (Jason He) Date: Fri, 16 Mar 2007 02:14:54 -0700 Subject: [Wtr-general] How to output brief/detail information when do logging Message-ID: Dear all, I use C:\watir1145\examples\logging\example_logger1.rb to do logging, it will output the same message both into the console and log file. Now, I want it output brief message on the console while detail message in the log file, in other words, the run result for each test case on the console and trace/debug information for every step in the log file, is there an switch parameter in it can achieve it? Or is there any ruby class/script/project which can conveniently solve this problem? Regards, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/9c7407b6/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: example_logger1.rb Type: application/octet-stream Size: 2592 bytes Desc: example_logger1.rb Url : http://rubyforge.org/pipermail/wtr-general/attachments/20070316/9c7407b6/attachment-0002.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: test_logger1.rb Type: application/octet-stream Size: 3651 bytes Desc: test_logger1.rb Url : http://rubyforge.org/pipermail/wtr-general/attachments/20070316/9c7407b6/attachment-0003.obj From tunde.jinadu at gmail.com Fri Mar 16 05:33:09 2007 From: tunde.jinadu at gmail.com (Tunde Jinadu) Date: Fri, 16 Mar 2007 09:33:09 +0000 Subject: [Wtr-general] Testing a development process Message-ID: <1624b0140703160233h346e7f54gdefd2e689bf31697@mail.gmail.com> Help, I've introduced Watir to a small software house i'm contracted with and now they love it so much, they want to get rid of me and include watir scripts in their build process. The CTO's comments are "Thank you for introducing us to Watir, WatirN, Goodbye". How can I convince them that they need a tester to write Watir, Watin scripts to ensure an independant eye and approach to testing. What are your suggestions -- The time to stop talking is when the other person nods his head affirmatively but says nothing. - Henry S. Haskins -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/0190b98c/attachment.html From forum-watir-users at openqa.org Fri Mar 16 06:30:57 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Fri, 16 Mar 2007 05:30:57 CDT Subject: [Wtr-general] using span Message-ID: <30594091.4241174041087959.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi all, I have a span link in which if we mouse hover on that link a form appears for us.It will be there still we cancel that form, And it does not work on click, So is there a way to automate that link using watir?? I used $ie.span(:class,"popup_link").click but it doesn't open the form, but i tried mouse hover manually while watir is running then watir recognized the form, so can u please help me to open the form using the mouse hover? Thanks in Advance, Harish From prema.arya at gmail.com Fri Mar 16 06:32:24 2007 From: prema.arya at gmail.com (Prema Arya) Date: Fri, 16 Mar 2007 16:02:24 +0530 Subject: [Wtr-general] How to output brief/detail information when do logging In-Reply-To: References: Message-ID: <27915010703160332t22b5f766sd20553a1591c7d89@mail.gmail.com> Hi Jason, You can look into Log4r library. http://log4r.sourceforge.net/ Regards, Prema On 3/16/07, Jason He wrote: > > Dear all, > > > > I use C:\watir1145\examples\logging\example_logger1.rb to do logging, it > will output the same message both into the console and log file. > > Now, I want it output brief message on the console while detail message in > the log file, in other words, the run result for each test case on the > console and trace/debug information for every step in the log file, is there > an switch parameter in it can achieve it? > > > > Or is there any ruby class/script/project which can conveniently solve > this problem? > > > > Regards, > > Jason > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- Prema Arya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/e5e5aa67/attachment.html From forum-watir-users at openqa.org Fri Mar 16 06:42:15 2007 From: forum-watir-users at openqa.org (John) Date: Fri, 16 Mar 2007 05:42:15 CDT Subject: [Wtr-general] Unable to load watir/contrib/enabled_popup In-Reply-To: <41293300.1173871367225.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <34042383.4291174041765257.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I had Watir 1.4 and I downloaded and installed Watir 1.5 and now it works. Thanks for the suggestion. Message was edited by: jarkelen1 From forum-watir-users at openqa.org Fri Mar 16 06:45:04 2007 From: forum-watir-users at openqa.org (John) Date: Fri, 16 Mar 2007 05:45:04 CDT Subject: [Wtr-general] Click on button which isn't a button Message-ID: <24302471.4341174041935233.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, In our website we have buttons which are actually div's but without any id or name. The html code looks like this:
Register now
How can I click on such a button? The ie.div(:index, 7).click method doesn't work. Thanks! From zeljko.filipin at gmail.com Fri Mar 16 06:48:41 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 16 Mar 2007 11:48:41 +0100 Subject: [Wtr-general] Click on button which isn't a button In-Reply-To: <24302471.4341174041935233.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <24302471.4341174041935233.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: This worked for me (watir 1.5.1.1158). ie.div(:text, "Register now").click -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/5f8915df/attachment.html From mathewjk at yahoo-inc.com Fri Mar 16 08:26:12 2007 From: mathewjk at yahoo-inc.com (Mathew Jacob) Date: Fri, 16 Mar 2007 17:56:12 +0530 Subject: [Wtr-general] 'getObject' command Message-ID: There is one object in browser page. Can I use the command 'getObject(how, what, types, value=nil)' to recognize that object. How we can implement this. mjk Yahoo India, EGL, Bangalore - 71, Phone:+91-80-30516346, Mobile:+91-9945849925 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/0635f022/attachment.html From mathewjk at yahoo-inc.com Fri Mar 16 08:32:09 2007 From: mathewjk at yahoo-inc.com (Mathew Jacob) Date: Fri, 16 Mar 2007 18:02:09 +0530 Subject: [Wtr-general] Calculating attachment uploading time Message-ID: I want to calculate the attachment uploading time in one mail client. How can I calculate this time. Help me in this scenario -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/2eb621d0/attachment.html From zeljko.filipin at gmail.com Fri Mar 16 08:35:14 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 16 Mar 2007 13:35:14 +0100 Subject: [Wtr-general] Calculating attachment uploading time In-Reply-To: References: Message-ID: Capture Timings section at http://en.wikipedia.org/wiki/Watir -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/c0154b6b/attachment.html From angrez at gmail.com Fri Mar 16 08:53:20 2007 From: angrez at gmail.com (Angrez Singh) Date: Fri, 16 Mar 2007 18:23:20 +0530 Subject: [Wtr-general] 'getObject' command In-Reply-To: References: Message-ID: Hi, Can you be more specific like what kind of object is it? Whats the HTML of the page? etc etc. The information you provided is not sufficient enough for anyone to be able to help you. Regards, Angrez On 3/16/07, Mathew Jacob wrote: > > There is one object in browser page. Can I use the command > 'getObject(how, what, types, value=nil)' to recognize that object. How we > can implement this. > > > > mjk > > > > > > * * > > > *Ya**ho**o India, EGL, Bangalore ? 71, Phone:+91-80-30516346, > Mobile:+91-9945849925* > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/2058fb7f/attachment-0001.html From forum-watir-users at openqa.org Fri Mar 16 08:55:59 2007 From: forum-watir-users at openqa.org (John) Date: Fri, 16 Mar 2007 07:55:59 CDT Subject: [Wtr-general] Click on button which isn't a button In-Reply-To: Message-ID: <26247753.5001174049789327.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> This works, thanks! But I have a complication: our site has multiple languages and we want to be able to run the tests on all languages. Therefore I can't use the text property, because this will be different in another languag than English. Of course I can use "ie.form(:name, "retailLocation").submit" instead, but this way I bypass the button and won't notice it when the button itself is not working. I would like to click on the div element based on index, but this doesn't seem to work? From areed at relocationcentral.com Fri Mar 16 09:16:57 2007 From: areed at relocationcentral.com (Adam Reed) Date: Fri, 16 Mar 2007 08:16:57 -0500 Subject: [Wtr-general] Click on button which isn't a button In-Reply-To: References: <24302471.4341174041935233.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36B5DBA88E027F47812ED877C6A978D8035037@rc-mail.relocationcentral.com> Yep - I just got a new mockup for one of our upcoming sites that uses divs in the same way, and I used the div-click just like Zeljko shows when the index method doesn't seem to find them. However, if you're experimenting and driving around the website for a while using IRB, sometimes IRB seems to "quit" for me. I could specify divs that I knew existed and had previously clicked on, and they would not activate or give me an error - they'd just hang out instead. I exited IRB and started it right back up again, and they worked flawlessly. I'm not sure how common this is, but you might want to try it out. Thanks, Adam ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of ?eljko Filipin Sent: Friday, March 16, 2007 5:49 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Click on button which isn't a button This worked for me (watir 1.5.1.1158). ie.div(:text, "Register now").click -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/1b63b303/attachment.html From zeljko.filipin at gmail.com Fri Mar 16 09:37:48 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 16 Mar 2007 14:37:48 +0100 Subject: [Wtr-general] Click on button which isn't a button In-Reply-To: <26247753.5001174049789327.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <26247753.5001174049789327.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: If language changes I would recommend that you ask your developer to add an id attribute to div tag. Then you would not have to rely on text. If that is not the option, you can try this. ie.cell(:html, /registration/).click or ie.cell(:html, /registration/).div(:text, //).click -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/b1a3adfa/attachment.html From Mark_Cain at RL.gov Fri Mar 16 09:54:13 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Fri, 16 Mar 2007 06:54:13 -0700 Subject: [Wtr-general] Calculating attachment uploading time In-Reply-To: References: Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A373E@EX01-2.rl.gov> I wrote this to get page loads times but you should be able to use it to accomplish what you are asking. require 'date' $start = DateTime.now # process you want to time here... $stop = DateTime.now diff = $stop - $start h,m,s,frac = Date.day_fraction_to_time(diff) s += frac.to_f File.open('C:\watir_bonus\working\pageSearchLoad_Times.txt', 'a+'){|d| d.puts "Time to load page: " + "#{h} Hours, #{m} Minutes, #{s} Seconds"} Hope this helps, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mathew Jacob Sent: Friday, March 16, 2007 5:32 AM To: wtr-general at rubyforge.org Cc: wtr-general-request at rubyforge.org Subject: [Wtr-general] Calculating attachment uploading time I want to calculate the attachment uploading time in one mail client. How can I calculate this time. Help me in this scenario -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/4c20a6b6/attachment.html From tester.paul at gmail.com Fri Mar 16 10:28:44 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 16 Mar 2007 10:28:44 -0400 Subject: [Wtr-general] Testing a development process In-Reply-To: <1624b0140703160233h346e7f54gdefd2e689bf31697@mail.gmail.com> References: <1624b0140703160233h346e7f54gdefd2e689bf31697@mail.gmail.com> Message-ID: <37c405480703160728n1ee7a4b2uc09eff2bc30e3882@mail.gmail.com> This is a great question and a tough one too. One of my philosophies during my career has always been to make myself replaceable so that I can move onto other more interesting things. In your situation, it sounds like you've accomplished that. You introduced a tool and a desire to move testing back towards the development staff. That's a great success, isn't it? That aside, I work in a small agile development shop and my boss understands the value provided by having independent software testers on the R&D team. Using a scripting tool to assist in the testing effort is not the same as automating testing. I don't believe that you can automate the complexity involved in real Testing. (And not in the foreseeable future either.) So the question I would pose back to you is this: can you articulate to the CTO what the difference is between testing software and computer assisted testing (i.e. otherwise called 'test automation')? Hint: the value you provide is not in the scripting. If your CTO can't understand that, then you might be better off looking for a new contract elsewhere anyway. Best wishes! Cheers. Paul C. On 16/03/07, Tunde Jinadu wrote: > > > Help, > > I've introduced Watir to a small software house i'm contracted with and > now they love it so much, they want to get rid of me and include watir > scripts in their build process. The CTO's comments are "Thank you for > introducing us to Watir, WatirN, Goodbye". How can I convince them that they > need a tester to write Watir, Watin scripts to ensure an independant eye and > approach to testing. > > What are your suggestions > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/4047cd01/attachment.html From areed at relocationcentral.com Fri Mar 16 10:32:53 2007 From: areed at relocationcentral.com (Adam Reed) Date: Fri, 16 Mar 2007 09:32:53 -0500 Subject: [Wtr-general] Click on button which isn't a button In-Reply-To: References: <26247753.5001174049789327.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36B5DBA88E027F47812ED877C6A978D8035038@rc-mail.relocationcentral.com> This brings up an interesting issue that came up yesterday. We have a new front-end designer on staff who was creating some mockups for a new project. I was getting familiar with his code and using watir to navigate around, and noticed that of the ~90 divs on the page, only 5-6 have unique (or any) id tags. These unnamed divs make up the primary navigation system for the site. There are no images, buttons or tables on the page. So of course, not thinking much into it - I ask if it would be possible for him add unique id tags to the major navigational elements (50% of the divs are not important to anything other than design). He replied, saying that adding unique ids to all elements would wreak havoc with style sheets, since all of these unnamed divs share the same style information. Also, for Search Engine Optimization (SEO), he needs to keep as much unnecessary text off the page as possible (although this point is debatable). In this case, where do we go from here? I completely understand his point, but at the same time I would be prevented from automating the majority of the tests on the new site. Of course we don't rely 100% on automation (probably less than 50%), but 100% manual testing requires quite more time, and produces many fewer test results. I'd be interested to hear solutions, or just comments on the issue - I know it has to be fairly common. -- Adam ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of ?eljko Filipin Sent: Friday, March 16, 2007 8:38 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Click on button which isn't a button If language changes I would recommend that you ask your developer to add an id attribute to div tag. Then you would not have to rely on text. If that is not the option, you can try this. ie.cell(:html, /registration/).click or ie.cell(:html, /registration/).div(:text, //).click -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/347c2c76/attachment-0001.html From forum-watir-users at openqa.org Fri Mar 16 10:39:28 2007 From: forum-watir-users at openqa.org (Bret Pettichord) Date: Fri, 16 Mar 2007 09:39:28 CDT Subject: [Wtr-general] Testing a development process In-Reply-To: <1624b0140703160233h346e7f54gdefd2e689bf31697@mail.gmail.com> Message-ID: <31181404.6631174055998338.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> It is time to find a new client. If you are right, with time they will figure out on their own why they need you and will be calling you back. Bret From charley.baker at gmail.com Fri Mar 16 11:25:45 2007 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 16 Mar 2007 09:25:45 -0600 Subject: [Wtr-general] using span In-Reply-To: <30594091.4241174041087959.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <30594091.4241174041087959.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: If it has a javascript onmouseover event associated with it, you could fire that event first and then get the controls. ie.span(:class, 'popup_link').fire_event('onmouseover') now interact with the controls on the rendered form. Hopefully that helps. -Charley On 3/16/07, Naga Harish Kanegolla wrote: > > Hi all, > I have a span link in which if we mouse hover on that link a form > appears for us.It will be there still we cancel that form, And it does not > work on click, So is there a way to automate that link using watir?? > I used $ie.span(:class,"popup_link").click but it doesn't open the form, > but i tried mouse hover manually while watir is running then watir > recognized the form, so can u please help me to open the form using the > mouse hover? > > Thanks in Advance, > Harish > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/269e818d/attachment.html From tester.paul at gmail.com Fri Mar 16 16:23:29 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 16 Mar 2007 16:23:29 -0400 Subject: [Wtr-general] Click on button which isn't a button In-Reply-To: <36B5DBA88E027F47812ED877C6A978D8035038@rc-mail.relocationcentral.com> References: <26247753.5001174049789327.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <36B5DBA88E027F47812ED877C6A978D8035038@rc-mail.relocationcentral.com> Message-ID: <37c405480703161323xc4d5119l9f1ef44fab00f56b@mail.gmail.com> Hi Adam, this is the situation we have with our navigation bar for one of our web apps. Using Watir 1.4.1 I couldn't use the 'text' attribute for SPAN tags and none of the Spans had unique ID's. What I ended up doing was creating two methods to help us navigate the system. The first one is called 'populate_navigation_bar' and the second is "navigate_bar()". In the first method, I iterate through all the Div and Span tags with the desired information and put them into a Hash array. The 'values' are the index numbers. Then when I want to navigate through the system, I call the navigate_bar() method and pass it the name I want and the method clicks the corresponding element using the index number. This gives me a certain amount of flexibility in my tests because I can now select random elements really easily for each test run, navigate to the 'top' of the list regardless of whatever it's called, and other cool things like that. In Watir 1.5.x, I can now use the 'text' attribute for Spans, but I decided to keep navigating the system the same way because I have greater control this way. That's how I deal with the problem anyway. Maybe this might work for you? Good luck! Cheers. Paul C. On 16/03/07, Adam Reed wrote: > > This brings up an interesting issue that came up yesterday. We have a > new front-end designer on staff who was creating some mockups for a new > project. I was getting familiar with his code and using watir to navigate > around, and noticed that of the ~90 divs on the page, only 5-6 have unique > (or any) id tags. These unnamed divs make up the primary navigation system > for the site. There are no images, buttons or tables on the page. > > So of course, not thinking much into it - I ask if it would be possible > for him add unique id tags to the major navigational elements (50% of the > divs are not important to anything other than design). He replied, saying > that adding unique ids to all elements would wreak havoc with style sheets, > since all of these unnamed divs share the same style information. Also, for > Search Engine Optimization (SEO), he needs to keep as much unnecessary text > off the page as possible (although this point is debatable). > > In this case, where do we go from here? I completely understand his > point, but at the same time I would be prevented from automating the > majority of the tests on the new site. Of course we don't rely 100% on > automation (probably less than 50%), but 100% manual testing requires quite > more time, and produces many fewer test results. > > I'd be interested to hear solutions, or just comments on the issue - I > know it has to be fairly common. > > -- Adam > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/88d3fdb9/attachment.html From areed at relocationcentral.com Fri Mar 16 16:46:35 2007 From: areed at relocationcentral.com (Adam Reed) Date: Fri, 16 Mar 2007 15:46:35 -0500 Subject: [Wtr-general] Click on button which isn't a button In-Reply-To: <37c405480703161323xc4d5119l9f1ef44fab00f56b@mail.gmail.com> References: <26247753.5001174049789327.JavaMail.oqa-j2ee@openqa01.managed.contegix.com><36B5DBA88E027F47812ED877C6A978D8035038@rc-mail.relocationcentral.com> <37c405480703161323xc4d5119l9f1ef44fab00f56b@mail.gmail.com> Message-ID: <36B5DBA88E027F47812ED877C6A978D803503B@rc-mail.relocationcentral.com> Thanks for the help Paul. I did have one question about this method, however: As far as putting indexes and the name you want in the Hash array, does this assume that the indexes of certain elements are constant through the website? The reason that I didn't use index navigation inititally was because as each div is clicked and activated, the div indexes around the page appear to change. While at first the "Home" div is #7, after being clicked it becomes #9. Would this throw a wrench in the gears of your script? There's a very good chance I've just missed the point, but that's how I understand it so far. Thanks again, Adam ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Carvalho Sent: Friday, March 16, 2007 3:23 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Click on button which isn't a button Hi Adam, this is the situation we have with our navigation bar for one of our web apps. Using Watir 1.4.1 I couldn't use the 'text' attribute for SPAN tags and none of the Spans had unique ID's. What I ended up doing was creating two methods to help us navigate the system. The first one is called 'populate_navigation_bar' and the second is "navigate_bar()". In the first method, I iterate through all the Div and Span tags with the desired information and put them into a Hash array. The 'values' are the index numbers. Then when I want to navigate through the system, I call the navigate_bar() method and pass it the name I want and the method clicks the corresponding element using the index number. This gives me a certain amount of flexibility in my tests because I can now select random elements really easily for each test run, navigate to the 'top' of the list regardless of whatever it's called, and other cool things like that. In Watir 1.5.x, I can now use the 'text' attribute for Spans, but I decided to keep navigating the system the same way because I have greater control this way. That's how I deal with the problem anyway. Maybe this might work for you? Good luck! Cheers. Paul C. On 16/03/07, Adam Reed wrote: This brings up an interesting issue that came up yesterday. We have a new front-end designer on staff who was creating some mockups for a new project. I was getting familiar with his code and using watir to navigate around, and noticed that of the ~90 divs on the page, only 5-6 have unique (or any) id tags. These unnamed divs make up the primary navigation system for the site. There are no images, buttons or tables on the page. So of course, not thinking much into it - I ask if it would be possible for him add unique id tags to the major navigational elements (50% of the divs are not important to anything other than design). He replied, saying that adding unique ids to all elements would wreak havoc with style sheets, since all of these unnamed divs share the same style information. Also, for Search Engine Optimization (SEO), he needs to keep as much unnecessary text off the page as possible (although this point is debatable). In this case, where do we go from here? I completely understand his point, but at the same time I would be prevented from automating the majority of the tests on the new site. Of course we don't rely 100% on automation (probably less than 50%), but 100% manual testing requires quite more time, and produces many fewer test results. I'd be interested to hear solutions, or just comments on the issue - I know it has to be fairly common. -- Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/47853cc0/attachment.html From esjewett at gmail.com Fri Mar 16 17:47:27 2007 From: esjewett at gmail.com (Ethan Jewett) Date: Fri, 16 Mar 2007 16:47:27 -0500 Subject: [Wtr-general] Tables nested in a div In-Reply-To: <6fcd26f10703151438s48a9c399u774b9240ba18f032@mail.gmail.com> References: <6fcd26f10703151438s48a9c399u774b9240ba18f032@mail.gmail.com> Message-ID: <68f4a0e80703161447n68713080k25e9a460049be0d@mail.gmail.com> John, I believe the .tables method returns an array of all the tables within div, so .tables[0] will return the first table in the div. Try: mainFrame.div(:id, "menuId").tables[1].click Ethan On 3/15/07, John Lloyd-Jones wrote: > I have a tricky page where I need to click on a a menu that has been > implemented as a table. There are many such menus and I can find the > surrounding div (by id), but there is no other way to find the table (it > doesn't have a predictable index, for example). So what I want is to ask the > Div for the table -- where it is in fact, the only nested table). > > E.g. > > menu = mainFrame.div(:id, "menuId") > menuTable = menu.table(:index, 1) > menuTable[ 4 ][ 1 ].click > > > Alas, this doesn't work out of the box -- Watir assumes that you always want > to find tables nested in the document, so it errors out on menu.table() > saying that there is no document. As tables are commonly nested in divs, and > as far as I can see, adding a table method to the Div class wouldn't break > any current code, is there any reason why Div couldn't do something like > this? > > class Watir::Div > def table( how, what ) > if how == :index > @o.getElementsByTagName( 'table' )[what.to_s] > Table.new(@ieController, :from_object, table) > else > super.table( how, what ) > end > end > end > > The table method overrides the super class for :index, but not for :id > (which should be unique, so it doesn't need special handling). > It certainly does make the code snipped abpve work. I haven't done any > exhaustive tests to see if it breaks anything, but I can't think of any > scenario where it could. > > John > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Fri Mar 16 17:51:57 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 16 Mar 2007 15:51:57 -0600 Subject: [Wtr-general] Click on button which isn't a button References: <26247753.5001174049789327.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <36B5DBA88E027F47812ED877C6A978D8035038@rc-mail.relocationcentral.com> Message-ID: <0eb001c76815$51d4a200$6400a8c0@laptop> there is a trick you can use when using stylesheets and id tags ( i forget exactly what/why) , but there are definitely other ways and probably better ways to do it. How much time will it take for him to change the divs to use class='some_css_clss' and ad ids, compared to you finding a way round this? My guess is its going to be better for everyone if he does it correctly. Can he put names on instead? How about a custom attribute (
) and then you do a quick hack in wastir to use testter_thing as an attribute ( thats actually pretty easy I think ) Some on the thread mentioned multi-lingual problems so they couldnt use :text - heres how I fixed that. I already had hundreds of elements coded, so couldnt afford the time to go back and change them all $lang = :french ie.div(:text , 'Click Me') .click We overrode the various watir methods- to check the $lang if its not set it uses english, otherwise it uses the specified language. Then looks up in an array ( or xml, or yaml, or whatever) and finds the english ( in this case CLick Me ) It then looks for the equivalent in the supplied language.. This way your script is still readable in English. Im sure its not the best way, but as we had lots of code already it seemed like the best way ----- Original Message ----- From: Adam Reed To: wtr-general at rubyforge.org Sent: Friday, March 16, 2007 8:32 AM Subject: Re: [Wtr-general] Click on button which isn't a button This brings up an interesting issue that came up yesterday. We have a new front-end designer on staff who was creating some mockups for a new project. I was getting familiar with his code and using watir to navigate around, and noticed that of the ~90 divs on the page, only 5-6 have unique (or any) id tags. These unnamed divs make up the primary navigation system for the site. There are no images, buttons or tables on the page. So of course, not thinking much into it - I ask if it would be possible for him add unique id tags to the major navigational elements (50% of the divs are not important to anything other than design). He replied, saying that adding unique ids to all elements would wreak havoc with style sheets, since all of these unnamed divs share the same style information. Also, for Search Engine Optimization (SEO), he needs to keep as much unnecessary text off the page as possible (although this point is debatable). In this case, where do we go from here? I completely understand his point, but at the same time I would be prevented from automating the majority of the tests on the new site. Of course we don't rely 100% on automation (probably less than 50%), but 100% manual testing requires quite more time, and produces many fewer test results. I'd be interested to hear solutions, or just comments on the issue - I know it has to be fairly common. -- Adam ------------------------------------------------------------------------------ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of ?eljko Filipin Sent: Friday, March 16, 2007 8:38 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Click on button which isn't a button If language changes I would recommend that you ask your developer to add an id attribute to div tag. Then you would not have to rely on text. If that is not the option, you can try this. ie.cell(:html, /registration/).click or ie.cell(:html, /registration/).div(:text, //).click -- ZeljkoFilipin.com ------------------------------------------------------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/10f48ad3/attachment.html From tester.paul at gmail.com Fri Mar 16 23:36:46 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 16 Mar 2007 23:36:46 -0400 Subject: [Wtr-general] Click on button which isn't a button In-Reply-To: <36B5DBA88E027F47812ED877C6A978D803503B@rc-mail.relocationcentral.com> References: <26247753.5001174049789327.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <36B5DBA88E027F47812ED877C6A978D8035038@rc-mail.relocationcentral.com> <37c405480703161323xc4d5119l9f1ef44fab00f56b@mail.gmail.com> <36B5DBA88E027F47812ED877C6A978D803503B@rc-mail.relocationcentral.com> Message-ID: <37c405480703162036h626d4c6eja2c7a30f9004787e@mail.gmail.com> Heh. You didn't miss the point. That's why "populate_navigation_bar" is a method! ;-) Cheers! Paul C. On 16/03/07, Adam Reed wrote: > > Thanks for the help Paul. I did have one question about this method, > however: > > As far as putting indexes and the name you want in the Hash array, does > this assume that the indexes of certain elements are constant through the > website? The reason that I didn't use index navigation inititally was > because as each div is clicked and activated, the div indexes around the > page appear to change. While at first the "Home" div is #7, after being > clicked it becomes #9. Would this throw a wrench in the gears of your > script? > > There's a very good chance I've just missed the point, but that's how I > understand it so far. > > Thanks again, > Adam > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070316/b06978c1/attachment.html From christopher.mcmahon at gmail.com Sun Mar 18 13:48:18 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Sun, 18 Mar 2007 11:48:18 -0600 Subject: [Wtr-general] idle question: "@ie.refresh2(3)"? Message-ID: <72799cd70703181048p64991ddfu5c6ccc86a22744ba@mail.gmail.com> I have a long-running script that occasionally encounters a server error. I've been considering putting in some retry logic (there are only 5 clicks in the script) that would just hit "refresh" if something went haywire. I didn't think Watir had a "refresh" method, but I went and looked, and there it was, along with "back" and "forward". But just out of curiosity, why is it called "refresh2" and why does it take 3 as a argument? -Chris From paul.rogers at shaw.ca Sun Mar 18 16:37:44 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 18 Mar 2007 14:37:44 -0600 Subject: [Wtr-general] idle question: "@ie.refresh2(3)"? References: <72799cd70703181048p64991ddfu5c6ccc86a22744ba@mail.gmail.com> Message-ID: <0f9201c7699d$48ad08f0$6400a8c0@laptop> http://msdn.microsoft.com/workshop/browser/webbrowser/reference/methods/refresh2.asp?frame=true ----- Original Message ----- From: "Chris McMahon" To: Sent: Sunday, March 18, 2007 11:48 AM Subject: [Wtr-general] idle question: "@ie.refresh2(3)"? >I have a long-running script that occasionally encounters a server > error. I've been considering putting in some retry logic (there are > only 5 clicks in the script) that would just hit "refresh" if > something went haywire. > > I didn't think Watir had a "refresh" method, but I went and looked, > and there it was, along with "back" and "forward". > > But just out of curiosity, why is it called "refresh2" and why does it > take 3 as a argument? > > -Chris > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Sun Mar 18 20:21:50 2007 From: forum-watir-users at openqa.org (steven) Date: Sun, 18 Mar 2007 19:21:50 CDT Subject: [Wtr-general] Difference in $browser.text Message-ID: <33581565.17671174263740076.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> With Watir - if I go to: http://validator.w3.org/check?verbose=1&uri=http://my.invalid.page.com I am looking for: This page is not Valid XHTML 1.0 Transitional! Using $browser.text, I get the correct value of: Root Namespace:http://www.w3.org/1999/xhtml Revalidate With Options: Show SourceShow Outline Validate error pagesVerbose Output Help on the options is available. Note: The Validator XML support has some limitations. This page is not Valid XHTML 1.0 Transitional! Below are the results of checking this document for X Now, if I use FireWatir, and use $browser.text, I get the following:

This page is not Valid XHTML 1.0 Transitional!

Below are the results of checking this document for X Since these are inconsistent, I am wondering if they are supposed to be that way and I have to code around them, or if one of them is either getting to much info, or not enough info. Any ideas? Steven From christopher.mcmahon at gmail.com Sun Mar 18 21:08:45 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Sun, 18 Mar 2007 19:08:45 -0600 Subject: [Wtr-general] Fwd: idle question: "@ie.refresh2(3)"? In-Reply-To: <0f9201c7699d$48ad08f0$6400a8c0@laptop> References: <72799cd70703181048p64991ddfu5c6ccc86a22744ba@mail.gmail.com> <0f9201c7699d$48ad08f0$6400a8c0@laptop> Message-ID: <72799cd70703181808h2c2431a2m50aae51b96b0f6ee@mail.gmail.com> Thanks Paul, I figured you'd have it handy. Interesting to see that there is not only a refresh() and refresh2(). there is also a Navigate() and Navigate2(). ---------- Forwarded message ---------- From: Paul Rogers Date: Mar 18, 2007 2:37 PM Subject: Re: [Wtr-general] idle question: "@ie.refresh2(3)"? To: wtr-general at rubyforge.org http://msdn.microsoft.com/workshop/browser/webbrowser/reference/methods/refresh2.asp?frame=true ----- Original Message ----- From: "Chris McMahon" To: Sent: Sunday, March 18, 2007 11:48 AM Subject: [Wtr-general] idle question: "@ie.refresh2(3)"? >I have a long-running script that occasionally encounters a server > error. I've been considering putting in some retry logic (there are > only 5 clicks in the script) that would just hit "refresh" if > something went haywire. > > I didn't think Watir had a "refresh" method, but I went and looked, > and there it was, along with "back" and "forward". > > But just out of curiosity, why is it called "refresh2" and why does it > take 3 as a argument? > > -Chris > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From luis_regueira at hotmail.com Mon Mar 19 05:08:22 2007 From: luis_regueira at hotmail.com (Luis Regueira) Date: Mon, 19 Mar 2007 10:08:22 +0100 Subject: [Wtr-general] Accessing an input field from the IE DOM Explorer Message-ID: Hi everyone I?m a complete newbie with Ruby and Watir and I have a problem that I can?t seem to solve. Hopefully someone here can help me out? Ok, here it is: On the page I have a drop down list. When one particular option is selected then a new input field shows up on the page. This is NOT a div or similar with its visibility set to "none". The problem is that this does not show up on the html source code. The only place where I can "find" this input field is in the IE DOM Explorer tree and only once it appears on the page. This is what it looks like in the tree: It is a INPUT inside a DIV inside a SPAN. How can I access this field? Can anyone give me hand or maybe direct me to a tutorial or something? Any help will be greatly appreciated. / Luis _________________________________________________________________ Motionera roligare med MSN H?lsa http://e-health.msn.se/ From zeljko.filipin at gmail.com Mon Mar 19 05:42:21 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Mon, 19 Mar 2007 10:42:21 +0100 Subject: [Wtr-general] Accessing an input field from the IE DOM Explorer In-Reply-To: References: Message-ID: ie.text_field(:id, "ct100_ch_cd_bl1_B3_oma_writeControl").set("text") -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070319/486379c0/attachment.html From zeljko.filipin at gmail.com Mon Mar 19 10:04:16 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Mon, 19 Mar 2007 15:04:16 +0100 Subject: [Wtr-general] Accessing an input field from the IE DOM Explorer In-Reply-To: References: Message-ID: On 3/19/07, Luis Regueira wrote: > > I tried that and I get this error message: "Unable to locate object, > using id and ct100_ch_cd_bl1_B3_oma_writeControl > (Watir::Exception::UnknownObjectException)". This IS the object id so that > is NOT the problem. Any other suggestions? > Make sure that you have performed action that causes text field to appear. Is it in the frame? Could you send url of page so we can try it? Or screen shot of dom? Can you reproduce that behaviour when you save that page to your machine (in that case, compress it and send here so we can try it)? -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070319/eab2b582/attachment.html From paul.rogers at shaw.ca Mon Mar 19 11:43:02 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 19 Mar 2007 09:43:02 -0600 Subject: [Wtr-general] Difference in $browser.text In-Reply-To: <33581565.17671174263740076.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <33581565.17671174263740076.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Firewatir is using an incorrect method for text. I sent the fix on, but I guess there has been no new release since. I cant rememeber what I had to do, and Im afraid I dont have it here. I'll try and post it on tonight Paul ----- Original Message ----- From: steven Date: Sunday, March 18, 2007 6:21 pm Subject: [Wtr-general] Difference in $browser.text > With Watir - if I go to: > http://validator.w3.org/check?verbose=1&uri=http://my.invalid.page.com > I am looking for: > > This page is not Valid XHTML 1.0 Transitional! > > > > Using $browser.text, I get the correct value of: > > Root Namespace:http://www.w3.org/1999/xhtml > Revalidate With Options: Show SourceShow Outline > Validate error pagesVerbose Output > Help on the options is available. > Note: The Validator XML support has some limitations. > This page is not Valid XHTML 1.0 Transitional! > Below are the results of checking this document for X > > > > > Now, if I use FireWatir, and use $browser.text, I get the following: > > > > > > >

>

This page is > not Valid XHTML 1.0 Transitional!

> >

> Below are the results of checking this document for > http://www.w3org/TR/REC-xml#sec-conformance">X > > > Since these are inconsistent, I am wondering if they are supposed > to be that way and I have to code around them, or if one of them > is either getting to much info, or not enough info. > > Any ideas? > Steven > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From Jason.He at resilience.com Mon Mar 19 21:49:59 2007 From: Jason.He at resilience.com (Jason He) Date: Mon, 19 Mar 2007 18:49:59 -0700 Subject: [Wtr-general] How to send the attachment by mail in Watir/Ruby In-Reply-To: Message-ID: Dear all, After running test cases, the test result will generate as files in hard disk, I want to send them as attachment by email, is there any way to do it? Thanks, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070319/854d5819/attachment.html From paul.rogers at shaw.ca Mon Mar 19 22:27:09 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 19 Mar 2007 20:27:09 -0600 Subject: [Wtr-general] How to send the attachment by mail in Watir/Ruby References: Message-ID: <001201c76a97$4319aab0$6400a8c0@laptop> this is not really a watir question... but, its quite easy to do attachemnts to messages. I think there is a ruby library that does it, and Im sure action-mailer will too Paul ----- Original Message ----- From: Jason He To: wtr-general at rubyforge.org Sent: Monday, March 19, 2007 7:49 PM Subject: [Wtr-general] How to send the attachment by mail in Watir/Ruby Dear all, After running test cases, the test result will generate as files in hard disk, I want to send them as attachment by email, is there any way to do it? Thanks, Jason ------------------------------------------------------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070319/686b086a/attachment.html From angrez at gmail.com Tue Mar 20 01:07:02 2007 From: angrez at gmail.com (Angrez Singh) Date: Tue, 20 Mar 2007 10:37:02 +0530 Subject: [Wtr-general] Difference in $browser.text In-Reply-To: References: <33581565.17671174263740076.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi, The text method has been corrected. It will be available in the next release. Regards, Angrez On 3/19/07, Paul Rogers wrote: > > Firewatir is using an incorrect method for text. I sent the fix on, but I > guess there has been no new release since. I cant rememeber what I had to > do, and Im afraid I dont have it here. I'll try and post it on tonight > > Paul > > > ----- Original Message ----- > From: steven > Date: Sunday, March 18, 2007 6:21 pm > Subject: [Wtr-general] Difference in $browser.text > > > With Watir - if I go to: > > http://validator.w3.org/check?verbose=1&uri=http://my.invalid.page.com > > I am looking for: > > > > This page is not Valid XHTML 1.0 Transitional! > > > > > > > > Using $browser.text, I get the correct value of: > > > > Root Namespace:http://www.w3.org/1999/xhtml > > Revalidate With Options: Show SourceShow Outline > > Validate error pagesVerbose Output > > Help on the options is available. > > Note: The Validator XML support has some limitations. > > This page is not Valid XHTML 1.0 Transitional! > > Below are the results of checking this document for X > > > > > > > > > > Now, if I use FireWatir, and use $browser.text, I get the following: > > > > > > > > > > > > > >

> >

This page is > > not Valid XHTML 1.0 Transitional!

> > > >

> > Below are the results of checking this document for > > http://www.w3org/TR/REC-xml#sec-conformance">X > > > > > > Since these are inconsistent, I am wondering if they are supposed > > to be that way and I have to code around them, or if one of them > > is either getting to much info, or not enough info. > > > > Any ideas? > > Steven > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070320/fec95b67/attachment-0001.html From forum-watir-users at openqa.org Tue Mar 20 01:53:17 2007 From: forum-watir-users at openqa.org (sathees) Date: Tue, 20 Mar 2007 00:53:17 CDT Subject: [Wtr-general] Selecting an 'accented character' from a list In-Reply-To: <55066101.1172851651269.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <29643078.25211174370027531.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> put them to an array and use it. myarray = [] myarray = $ie.select_list(:whatever, 'whatever').getAllContents now you can see which one is your text by doing myarray.length.times do |x| puts "index" + "#{x}" + " " + "#{myarray[x]}" end From forum-watir-users at openqa.org Tue Mar 20 02:34:53 2007 From: forum-watir-users at openqa.org (sathees) Date: Tue, 20 Mar 2007 01:34:53 CDT Subject: [Wtr-general] Save Image Hangs? Message-ID: <30399795.25691174372523715.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I am running a watir script that saves images. Runs fine except it hangs at save window some time. Waiting for me to click cancel or save and it continues to run. Is this a problem with watir? From mathewjk at yahoo-inc.com Tue Mar 20 07:06:20 2007 From: mathewjk at yahoo-inc.com (Mathew Jacob) Date: Tue, 20 Mar 2007 16:36:20 +0530 Subject: [Wtr-general] 'getObject' command In-Reply-To: References: Message-ID: Hi Angrez, It is an object 'Menu button'. This object is an Menu Button and contains two options on it. Attached is the HTML code of this button. div>

and control that you can access using ie.select_list and ie.button respectively. Let me know what you want to do so that I can help you further. Regards, Angrez On 3/20/07, Mathew Jacob wrote: > > Hi Angrez, > > It is an object 'Menu button'. This object is an Menu > Button and contains two options on it. Attached is the HTML code of this > button. > > > > div> > >