From angrez at gmail.com Sat Apr 1 01:24:02 2006 From: angrez at gmail.com (Angrez Singh) Date: Sat, 1 Apr 2006 11:54:02 +0530 Subject: [Wtr-general] firewatir question In-Reply-To: <442D9792.1030004@meyer-pollans.net> References: <442D9792.1030004@meyer-pollans.net> Message-ID: Hi Warren, $ ruby checkbox_xpath_test.rb > Loaded suite checkbox_xpath_test > Started > ....... > Finished in -43.812 seconds. > > 7 tests, 45 assertions, 0 failures, 0 errors > > Can this be correct? Yes, this is correct. Current version of FireWatir is slow. > Is there something that I need to configure (or unconfigure) on firefox? > I just installed it (1.5.0.1) and the firewatir extension. No, you don't need to do anything else. mozilla_all_tests.rb is running now - there are 14 dots on the line > below "Started" - it doesn't look like anything is changing in the > firefox window - it's changed from buttons to checkboxes. > > What have I missed? Nothing, it will take a lot of time to run all the FireWatir test cases. You can view the previous posts regarding this. Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060401/a9f202cb/attachment.html From ati.ozgur at gmail.com Sat Apr 1 03:06:09 2006 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Sat, 1 Apr 2006 11:06:09 +0300 Subject: [Wtr-general] Help using Screen Capture In-Reply-To: <38c139080603311828vad5a37dw954551a4c565125@mail.gmail.com> References: <38c139080603311828vad5a37dw954551a4c565125@mail.gmail.com> Message-ID: Can you try sending down key via autoit then capturing screen. I am not whether there is an auto scroll feature that > exists in Watir...Can someone please let me know?? > > > From oblomov.consulting at googlemail.com Sat Apr 1 05:38:38 2006 From: oblomov.consulting at googlemail.com (George Hawthorne) Date: Sat, 1 Apr 2006 11:38:38 +0100 Subject: [Wtr-general] Ruby and Watir version from IRB In-Reply-To: <20060331232417.91612.qmail@web80322.mail.yahoo.com> References: <20060331232417.91612.qmail@web80322.mail.yahoo.com> Message-ID: <880925dd0604010238k6436fd33vead5da6a8410ec46@mail.gmail.com> Hi Guru, Nice to finally come across a question on this list that I can answer... irb(main):002:0> require "watir" irb(main):003:0> Watir::IE::VERSION irb(main):004:0> print `ruby --version` George On 01/04/06, Guru Subramanyam wrote: > Hi, > > Is there a way to find out the version of Ruby and > Watir from within the IRB? > > Thanks > Guru From chesschintan at gmail.com Sat Apr 1 06:28:59 2006 From: chesschintan at gmail.com (Chintan Trivedi) Date: Sat, 1 Apr 2006 16:58:59 +0530 Subject: [Wtr-general] Ideas on improving firewatir performance. Code included Message-ID: Hi, FireWatir release was like "freedom of soul". I needed something like watir to run on my linux system and firewatir solved that problem. However, while working with firewatir, I found it to be very slow. Initially it was tough to figure out as to what could be the problem. From the code it seemed like there was lot of communication happening between firewatir and jssh server. eg. Say for accessing a textbox, firewatir will first ask the browser about the textbox element and then send the events. Similarly for each and every element user requests for, will make firewatir to talk with the browser. Keeping this in mind I created a sample code which deals with this issue. Its available for download from http://www.geocities.com/chesschintan/rufire.tgz The code first downloads whole html page and uses htmltokenizer to create various textboxes, buttons and other elements. This reduces a lot of overhead. Though it has one drawback. That is if after opening a page using ff.goto(), the user manually opens another page using firefox then the code would fail. However its a kinda very rare case. Second noticable thing was the way firewatir implemented read_socket(). This seemed to be a major cause decreasing the performance. However while testing, jssh protocol was found to be kinda misbehaving. Simple socket.gets() or socket.recv() doesnt work. May be thatz the reason which tempted author to implement read_socket() in a reliable manner sacrificing bit of performance. But socket.sysread() is a beautiful socket method which worked for me. After doing the above two changes code worked with charm even beating (watir) IE performance. Rufire supports only textbox, radio, buttons and checkbox elements. Its not a complete code. I made it just for the sake of testing with above two changes. You can copy test.html available in the .tgz to localhost webserver and test using test.rb file. Currently it lacks one feature of knowing whether hml page has been loaded in browser or not. Add a sleep statement with good value in Firefox.goto() just in case you wanna test it against a heavy website. Thanks Chintan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060401/3711ec70/attachment.html From zeljko.filipin at gmail.com Sat Apr 1 12:11:04 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Sat, 1 Apr 2006 19:11:04 +0200 Subject: [Wtr-general] Files as argument when running a suite In-Reply-To: <20060331233841.97917.qmail@web50908.mail.yahoo.com> References: <20060331233841.97917.qmail@web50908.mail.yahoo.com> Message-ID: Try yaml, I am using it. http://yaml4r.sourceforge.net/ On 4/1/06, Deepa Mallapareddy wrote: > > Hi all, > > I have to give a config file( file with variables like username and > pwd and URL ) as an argument when running a suite. and I should be able to > use the variables in this entire test suite Im eunning. > > Can you please suggest > > Any input on this will be appreciated. > > Thanks in Advance! > Deepa > > > Whatever you can do or dream you can, begin it. Boldness has genius, > power, and magic in it. > --Johann Wolfgang von Goethe * * > *------------------------------------------------------------------------* > Deepa Mallapareddy, > 4981,Catoctin Drive, > Apt#15,San Diego > CA - 92115 > > ------------------------------ > How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call > rates. > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- http://www.testingreflections.com/blog/3071 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060401/ab04eb63/attachment.html From PGarigue at EXTEND.COM Sat Apr 1 13:39:32 2006 From: PGarigue at EXTEND.COM (Pierre Garigue) Date: Sat, 1 Apr 2006 13:39:32 -0500 Subject: [Wtr-general] Files as argument when running a suite Message-ID: I use this to debug my hand-witten yaml file. I run this in SCiTE so that I see all the results in the 'result frame' ---------------------------------------------------------- require 'yaml' require 'pp' #used to debug the yaml structure tree = YAML::load( File.open('your_file_goes_here.yml' ) ) #print the yaml file puts "\nthis is the yaml file\n" puts tree.to_yaml #print the tree puts "\nthis is the structue from this yaml\n\n" pp tree ------------------------------------ cheer Pierre -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Saturday, April 01, 2006 12:11 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Files as argument when running a suite Try yaml, I am using it. http://yaml4r.sourceforge.net/ On 4/1/06, Deepa Mallapareddy < phanideepam at yahoo.com> wrote: Hi all, I have to give a config file( file with variables like username and pwd and URL ) as an argument when running a suite. and I should be able to use the variables in this entire test suite Im eunning. Can you please suggest Any input on this will be appreciated. Thanks in Advance! Deepa Whatever you can do or dream you can, begin it. Boldness has genius, power, and magic in it. --Johann Wolfgang von Goethe ------------------------------------------------------------------------ Deepa Mallapareddy, 4981,Catoctin Drive, Apt#15,San Diego CA - 92115 _____ How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- http://www.testingreflections.com/blog/3071 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060401/1846dc68/attachment.html From jbe at mjolner.dk Mon Apr 3 17:00:43 2006 From: jbe at mjolner.dk (=?iso-8859-1?Q?J=F8rgen_Bang_Erichsen?=) Date: Mon, 3 Apr 2006 23:00:43 +0200 Subject: [Wtr-general] W3C validation problems Message-ID: Hi, Inspired by http://redgreenblu.com/svn/projects/assert_valid_markup/lib/assert_valid_markup.rb I would like to have an easy way to validate the html on the page IE is currently showing. Unfortunately, I have a problem with the html that ie.document.body.parentelement.outerhtml outputs :-( Take a look at the following example: require 'test/unit' require 'watir' require 'net/http' require 'cgi' require 'xmlsimple' class ValidationExample < Test::Unit::TestCase include Watir def test_w3c_validate ie = IE.new ie.goto 'validator.w3.org/' html = ie.document.body.parentelement.outerhtml response = Net::HTTP.start('validator.w3.org').post2('/check', "fragment=#{CGI.escape(html)}&output=xml") markup_is_valid = response['x-w3c-validator-status']=='Valid' message = markup_is_valid ? '' : XmlSimple.xml_in(response.body)['messages'][0]['msg'].collect{ |m| "Invalid markup: line #{m['line']}: #{CGI.unescapeHTML(m['content'])}" }.join("\n") assert markup_is_valid, message ie.close end end When I run the example I get stuff like: Invalid markup: line 1: no document type declaration; implying "" Invalid markup: line 1: there is no attribute "XML:LANG" Invalid markup: line 1: there is no attribute "XMLNS" The html returned by ie.document.body.parentelement.outerhtml is The W3C Markup Validation Service but if I view the source from IE itself it is something like The W3C Markup Validation Service ... The DOCTYPE line and several quotes are missing. Is there any way to get the unmodified html for the current page? If people are doing automatic validation any other way I am open to suggestions. Best regards, J?rgen From Mark_Cain at rl.gov Mon Apr 3 17:18:18 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Mon, 3 Apr 2006 14:18:18 -0700 Subject: [Wtr-general] W3C validation problems Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E020F76A3@EX5V.rl.gov> You should be able to do: ie = IE.new ie.goto 'http://validator.w3.org/' ie.html --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of J?rgen Bang Erichsen Sent: Monday, April 03, 2006 2:01 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] W3C validation problems Hi, Inspired by http://redgreenblu.com/svn/projects/assert_valid_markup/lib/assert_valid_markup.rb I would like to have an easy way to validate the html on the page IE is currently showing. Unfortunately, I have a problem with the html that ie.document.body.parentelement.outerhtml outputs :-( Take a look at the following example: require 'test/unit' require 'watir' require 'net/http' require 'cgi' require 'xmlsimple' class ValidationExample < Test::Unit::TestCase include Watir def test_w3c_validate ie = IE.new ie.goto 'validator.w3.org/' html = ie.document.body.parentelement.outerhtml response = Net::HTTP.start('validator.w3.org').post2('/check', "fragment=#{CGI.escape(html)}&output=xml") markup_is_valid = response['x-w3c-validator-status']=='Valid' message = markup_is_valid ? '' : XmlSimple.xml_in(response.body)['messages'][0]['msg'].collect{ |m| "Invalid markup: line #{m['line']}: #{CGI.unescapeHTML(m['content'])}" }.join("\n") assert markup_is_valid, message ie.close end end When I run the example I get stuff like: Invalid markup: line 1: no document type declaration; implying "" Invalid markup: line 1: there is no attribute "XML:LANG" Invalid markup: line 1: there is no attribute "XMLNS" The html returned by ie.document.body.parentelement.outerhtml is The W3C Markup Validation Service but if I view the source from IE itself it is something like The W3C Markup Validation Service ... The DOCTYPE line and several quotes are missing. Is there any way to get the unmodified html for the current page? If people are doing automatic validation any other way I am open to suggestions. Best regards, J?rgen _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From guru_sc at yahoo.com Mon Apr 3 17:25:43 2006 From: guru_sc at yahoo.com (Guru Subramanyam) Date: Mon, 3 Apr 2006 14:25:43 -0700 (PDT) Subject: [Wtr-general] Sourcing .rb files from within IRB Message-ID: <20060403212543.9004.qmail@web80307.mail.yahoo.com> Hi, Is there a way to source .rb files from within IRB? Thanks much Guru From bret at pettichord.com Mon Apr 3 22:26:27 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 3 Apr 2006 20:26:27 -0600 Subject: [Wtr-general] Sourcing .rb files from within IRB In-Reply-To: <20060403212543.9004.qmail@web80307.mail.yahoo.com> References: <20060403212543.9004.qmail@web80307.mail.yahoo.com> Message-ID: >load 'file.rb' On 4/3/06, Guru Subramanyam wrote: > > Hi, > > Is there a way to source .rb files from within IRB? > > Thanks much > Guru > _______________________________________________ > 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/20060403/756e503d/attachment.html From bret at pettichord.com Mon Apr 3 22:30:25 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 3 Apr 2006 20:30:25 -0600 Subject: [Wtr-general] Help using Screen Capture In-Reply-To: <38c139080603311828vad5a37dw954551a4c565125@mail.gmail.com> References: <38c139080603311828vad5a37dw954551a4c565125@mail.gmail.com> Message-ID: If Snagit isn't good enough, then there is no way you're going to get Watir's little two-bit screen capture to solve your problem. Bret On 3/31/06, Padhma N wrote: > > Hi All, > > Sorry for my repost. I am still stuck up on this particular thing and > thought I can try my luck again here.. > > Is there an autoscroll feature in Watir? I need to use screen_capture on > my web page but the webpage is kinda long that it has be scrolled down to > see the entire web page. The screen_capture functioanlity in Watir captures > only the visible page. I am not whether there is an auto scroll feature that > exists in Watir...Can someone please let me know?? > > Any suggestion will be really helpful. > > Thanks, > Padhma > > > _______________________________________________ > 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/20060403/95229fcd/attachment.html From bret at pettichord.com Mon Apr 3 22:35:17 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 3 Apr 2006 20:35:17 -0600 Subject: [Wtr-general] Files as argument when running a suite In-Reply-To: <20060331233841.97917.qmail@web50908.mail.yahoo.com> References: <20060331233841.97917.qmail@web50908.mail.yahoo.com> Message-ID: require 'config.rb' If that doesn't work, then you'll need to explain more what you want to do. Bret On 3/31/06, Deepa Mallapareddy wrote: > > Hi all, > > I have to give a config file( file with variables like username and > pwd and URL ) as an argument when running a suite. and I should be able to > use the variables in this entire test suite Im eunning. > > Can you please suggest > > Any input on this will be appreciated. > > Thanks in Advance! > Deepa > > > Whatever you can do or dream you can, begin it. Boldness has genius, > power, and magic in it. > --Johann Wolfgang von Goethe * * > *------------------------------------------------------------------------* > Deepa Mallapareddy, > 4981,Catoctin Drive, > Apt#15,San Diego > CA - 92115 > > ------------------------------ > How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call > rates. > > > > _______________________________________________ > 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/20060403/a7bc735e/attachment.html From paul.rogers at shaw.ca Mon Apr 3 23:26:08 2006 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 03 Apr 2006 21:26:08 -0600 Subject: [Wtr-general] W3C validation problems In-Reply-To: Message-ID: <026001c65797$837db650$6600a8c0@NewDell> If I remember correctly, the html you will see using that method is Ies version of the html, not what it has actually received. So if you right click and then do a view source, and then in watir do a ie.document.body.parentelement.outerhtml You are likely to see different things I don?t think there was a way to find the 'raw' html Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of J?rgen Bang Erichsen Sent: 03 April 2006 15:01 To: wtr-general at rubyforge.org Subject: [Wtr-general] W3C validation problems Hi, Inspired by http://redgreenblu.com/svn/projects/assert_valid_markup/lib/assert_valid _markup.rb I would like to have an easy way to validate the html on the page IE is currently showing. Unfortunately, I have a problem with the html that ie.document.body.parentelement.outerhtml outputs :-( Take a look at the following example: require 'test/unit' require 'watir' require 'net/http' require 'cgi' require 'xmlsimple' class ValidationExample < Test::Unit::TestCase include Watir def test_w3c_validate ie = IE.new ie.goto 'validator.w3.org/' html = ie.document.body.parentelement.outerhtml response = Net::HTTP.start('validator.w3.org').post2('/check', "fragment=#{CGI.escape(html)}&output=xml") markup_is_valid = response['x-w3c-validator-status']=='Valid' message = markup_is_valid ? '' : XmlSimple.xml_in(response.body)['messages'][0]['msg'].collect{ |m| "Invalid markup: line #{m['line']}: #{CGI.unescapeHTML(m['content'])}" }.join("\n") assert markup_is_valid, message ie.close end end When I run the example I get stuff like: Invalid markup: line 1: no document type declaration; implying "" Invalid markup: line 1: there is no attribute "XML:LANG" Invalid markup: line 1: there is no attribute "XMLNS" The html returned by ie.document.body.parentelement.outerhtml is The W3C Markup Validation Service but if I view the source from IE itself it is something like The W3C Markup Validation Service ... The DOCTYPE line and several quotes are missing. Is there any way to get the unmodified html for the current page? If people are doing automatic validation any other way I am open to suggestions. Best regards, J?rgen _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Eli.Smith at nextaction.net Tue Apr 4 13:58:17 2006 From: Eli.Smith at nextaction.net (Eli Smith) Date: Tue, 4 Apr 2006 11:58:17 -0600 Subject: [Wtr-general] SciTE Repeats Input Chars in IRB Message-ID: Greetings, Rubyists. Ruby newbie here with an SciTE question. How do I stop SciTE from repeating my input chars in IRB? I can't figure out which bit to flip off but it's got me crazed. The suggestions at http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/143959 didn't solve it. adTHANKSvance, ~Eli-> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060404/b9896914/attachment.html From BPaatsch at activevoice.com Tue Apr 4 14:17:52 2006 From: BPaatsch at activevoice.com (Paatsch, Bernd) Date: Tue, 4 Apr 2006 13:17:52 -0500 Subject: [Wtr-general] Validating all php generated html code? Message-ID: Hello Watir team. I got a new interesting assignment, to validate all html code of all our products. Doing this manual would take me a very long time. Thus I seek an automated solution and wonder if anybody has done something similar? Here is what I think needs to be done: 1. Generate each html page possible (the html code is created by MySQL and php scripts). It would be great to have a web crawler clicking each link at the web-site and saving the generated html-file. 2. Validating all the html files Has anybody done something like this? Any ideas regarding what tools to use? Any recommendations, ideas, etc? Thanks for your help. Bernd -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060404/fa8da30e/attachment.html From jkohl at telusplanet.net Tue Apr 4 14:27:15 2006 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 4 Apr 2006 11:27:15 -0700 Subject: [Wtr-general] Validating all php generated html code? In-Reply-To: References: Message-ID: <1144175235.4432ba8381545@webmail.telusplanet.net> If you're looking at pure HTML validation, I'd look at doing this at the HTTP layer. If I'm not mistaken, most web browsers (IE included) fill in missing closing tags. You will probably see IE's version of the HTML, not necessarily what the PHP scripts are actually generating. Someone who knows more can correct me if I'm wrong. :-) -Jonathan Quoting "Paatsch, Bernd" : > Hello Watir team. > > I got a new interesting assignment, to validate all html code of all our > products. Doing this manual would take me a very long time. Thus I seek an > automated solution and wonder if anybody has done something similar? Here is > what I think needs to be done: > > 1. Generate each html page possible (the html code is created by MySQL and > php scripts). It would be great to have a web crawler clicking each link at > the web-site and saving the generated html-file. > 2. Validating all the html files > > Has anybody done something like this? Any ideas regarding what tools to use? > Any recommendations, ideas, etc? > > Thanks for your help. > Bernd > > > From tester.paul at gmail.com Tue Apr 4 14:33:50 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Tue, 4 Apr 2006 14:33:50 -0400 Subject: [Wtr-general] SciTE Repeats Input Chars in IRB In-Reply-To: References: Message-ID: <37c405480604041133r6cc67233x4ea4581c0f204a5d@mail.gmail.com> Hello Eli, there's a lot of information you didn't offer to allow us to help you better. What version of Ruby are you using (so we know the version of SciTE)? What version of Watir? How are you executing the scripts? Which "input chars" are being echoed? Can you include a sample of your code and the corresponding annoying output? Help us out a bit here. ;-) Cheers. Paul. On 04/04/06, Eli Smith wrote: > > Greetings, Rubyists. > > Ruby newbie here with an SciTE question. > > How do I stop SciTE from repeating my input chars in IRB? > > I can't figure out which bit to flip off but it's got me crazed. > > The suggestions at > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/143959 didn't > solve it. > > > > adTHANKSvance, > > ~Eli-> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060404/8bae7c00/attachment.html From klancaster1957 at gmail.com Tue Apr 4 15:28:26 2006 From: klancaster1957 at gmail.com (Keith Lancaster) Date: Tue, 04 Apr 2006 14:28:26 -0500 Subject: [Wtr-general] SciTE Repeats Input Chars in IRB In-Reply-To: <37c405480604041133r6cc67233x4ea4581c0f204a5d@mail.gmail.com> Message-ID: I ran into the same problem with SciTE. The echoing happens in the command window as I recall, and has nothing to do with Watir. I?m also pretty sure it happens regardless of Ruby version. What most folks recommend is using SciTe as an editor, but running your code in a regular command window (assuming you are running Windows). Just open a command prompt and type irb. HTH, Keith On 4/4/06 1:33 PM, "Paul Carvalho" wrote: > Hello Eli, there's a lot of information you didn't offer to allow us to help > you better. > > What version of Ruby are you using (so we know the version of SciTE)? What > version of Watir? > > How are you executing the scripts? Which "input chars" are being echoed? Can > you include a sample of your code and the corresponding annoying output? > > Help us out a bit here. ;-) > > Cheers. Paul. > > > On 04/04/06, Eli Smith > wrote: >> Greetings, Rubyists. >> >> Ruby newbie here with an SciTE question. >> >> How do I stop SciTE from repeating my input chars in IRB? >> >> I can't figure out which bit to flip off but it's got me crazed. >> >> The suggestions at >> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/143959 didn't >> solve it. >> >> >> >> adTHANKSvance, >> >> ~Eli-> >> > > > _______________________________________________ > 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/20060404/5218b12c/attachment.html From Eli.Smith at nextaction.net Tue Apr 4 15:39:22 2006 From: Eli.Smith at nextaction.net (Eli Smith) Date: Tue, 4 Apr 2006 13:39:22 -0600 Subject: [Wtr-general] SciTE Repeats Input Chars in IRB Message-ID: Fair enough, Paul. Lemme spill my guts. I'm using Ruby 1.8.2, Watir 1.4.1, and SciTE 1.59 on a Winserver 2003 with SP1. To see the problem: 1. Start SciTE on Windows. 2. Select Tools > Run irb from the menu system. 3. Type into the command window provided. Each character entered it displayed twice. Guess what this is? rreeqquuiirree ''wwaattiirr'' Makes you wanna start a command prompt! Any known workarounds? I like the near-IDE SciTE provides. ~Eli-> ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Carvalho Sent: Tuesday, April 04, 2006 12:34 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] SciTE Repeats Input Chars in IRB Hello Eli, there's a lot of information you didn't offer to allow us to help you better. What version of Ruby are you using (so we know the version of SciTE)? What version of Watir? How are you executing the scripts? Which "input chars" are being echoed? Can you include a sample of your code and the corresponding annoying output? Help us out a bit here. ;-) Cheers. Paul. On 04/04/06, Eli Smith wrote: Greetings, Rubyists. Ruby newbie here with an SciTE question. How do I stop SciTE from repeating my input chars in IRB? I can't figure out which bit to flip off but it's got me crazed. The suggestions at http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/143959 didn't solve it. adTHANKSvance, ~Eli-> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060404/ecd8454c/attachment.html From tester.paul at gmail.com Tue Apr 4 16:09:14 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Tue, 4 Apr 2006 16:09:14 -0400 Subject: [Wtr-general] SciTE Repeats Input Chars in IRB In-Reply-To: References: Message-ID: <37c405480604041309r6cb1cfb0hf659aea20bb5a5e5@mail.gmail.com> Ah, now I see. I am using Ruby 1.8.4-16 with SciTE 1.67. There is *no* "Run irb" under the Tools menu. I guess it didn't work so they took it out. Sorry. Looks like you'll have to CMD-prompt it to work around this problem. Cheers. Paul. On 04/04/06, Eli Smith wrote: > > Fair enough, Paul. Lemme spill my guts. > > I'm using Ruby 1.8.2, Watir 1.4.1, and SciTE 1.59 on a Winserver 2003 with > SP1. > > To see the problem: > > 1. Start SciTE on Windows. > 2. Select Tools > Run irb from the menu system. > 3. Type into the command window provided. > > Each character entered it displayed twice. Guess what this is? > > rreeqquuiirree ''wwaattiirr'' > > > > Makes you wanna start a command prompt! > > Any known workarounds? I like the near-IDE SciTE provides. > > > > ~Eli-> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060404/8834decc/attachment.html From Mark_Cain at rl.gov Tue Apr 4 17:07:08 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 4 Apr 2006 14:07:08 -0700 Subject: [Wtr-general] SciTE Repeats Input Chars in IRB Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E020F76A6@EX5V.rl.gov> You can type: Cmd Echo off Cd \ruby\bin Irb Ruby code here But this is just a command window inside SciTE. It is a much better experience via a command window. If you want an IRB window inside your editor, download the latest version if FreeRide and it has one built in. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eli Smith Sent: Tuesday, April 04, 2006 12:39 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] SciTE Repeats Input Chars in IRB Fair enough, Paul. Lemme spill my guts. I'm using Ruby 1.8.2, Watir 1.4.1, and SciTE 1.59 on a Winserver 2003 with SP1. To see the problem: 1. Start SciTE on Windows. 2. Select Tools > Run irb from the menu system. 3. Type into the command window provided. Each character entered it displayed twice. Guess what this is? rreeqquuiirree ''wwaattiirr'' Makes you wanna start a command prompt! Any known workarounds? I like the near-IDE SciTE provides. ~Eli-> ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Carvalho Sent: Tuesday, April 04, 2006 12:34 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] SciTE Repeats Input Chars in IRB Hello Eli, there's a lot of information you didn't offer to allow us to help you better. What version of Ruby are you using (so we know the version of SciTE)? What version of Watir? How are you executing the scripts? Which "input chars" are being echoed? Can you include a sample of your code and the corresponding annoying output? Help us out a bit here. ;-) Cheers. Paul. On 04/04/06, Eli Smith wrote: Greetings, Rubyists. Ruby newbie here with an SciTE question. How do I stop SciTE from repeating my input chars in IRB? I can't figure out which bit to flip off but it's got me crazed. The suggestions at http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/143959 didn't solve it. adTHANKSvance, ~Eli-> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060404/d519182c/attachment.html From Eli.Smith at nextaction.net Tue Apr 4 18:20:06 2006 From: Eli.Smith at nextaction.net (Eli Smith) Date: Tue, 4 Apr 2006 16:20:06 -0600 Subject: [Wtr-general] SciTE Repeats Input Chars in IRB Message-ID: Thanks for the input, all. And I see your point, Mark. I'll have to get more comfortable in Windows non-UNIX command line. So it sounds like the preference is for editing with SciTE (or editor of choice) and execution from the command line. I think my environment needs some work. ~Eli-> ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Tuesday, April 04, 2006 3:07 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] SciTE Repeats Input Chars in IRB You can type: Cmd Echo off Cd \ruby\bin Irb Ruby code here But this is just a command window inside SciTE. It is a much better experience via a command window. If you want an IRB window inside your editor, download the latest version if FreeRide and it has one built in. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eli Smith Sent: Tuesday, April 04, 2006 12:39 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] SciTE Repeats Input Chars in IRB Fair enough, Paul. Lemme spill my guts. I'm using Ruby 1.8.2, Watir 1.4.1, and SciTE 1.59 on a Winserver 2003 with SP1. To see the problem: 1. Start SciTE on Windows. 2. Select Tools > Run irb from the menu system. 3. Type into the command window provided. Each character entered it displayed twice. Guess what this is? rreeqquuiirree ''wwaattiirr'' Makes you wanna start a command prompt! Any known workarounds? I like the near-IDE SciTE provides. ~Eli-> ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Carvalho Sent: Tuesday, April 04, 2006 12:34 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] SciTE Repeats Input Chars in IRB Hello Eli, there's a lot of information you didn't offer to allow us to help you better. What version of Ruby are you using (so we know the version of SciTE)? What version of Watir? How are you executing the scripts? Which "input chars" are being echoed? Can you include a sample of your code and the corresponding annoying output? Help us out a bit here. ;-) Cheers. Paul. On 04/04/06, Eli Smith wrote: Greetings, Rubyists. Ruby newbie here with an SciTE question. How do I stop SciTE from repeating my input chars in IRB? I can't figure out which bit to flip off but it's got me crazed. The suggestions at http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/143959 didn't solve it. adTHANKSvance, ~Eli-> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060404/46011b03/attachment.html From tester.paul at gmail.com Tue Apr 4 18:46:45 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Tue, 4 Apr 2006 18:46:45 -0400 Subject: [Wtr-general] SciTE Repeats Input Chars in IRB In-Reply-To: References: Message-ID: <37c405480604041546h4f8a38dcle599646a845c624f@mail.gmail.com> Hi Eli, you can execute your scripts from within SciTE too. Just press [F8] to see the output pane and press [F5] to run the script. The output pane shows you the output that you would normally see in a command window. No need to run it separately. Hope this helps. Paul. On 04/04/06, Eli Smith wrote: > > Thanks for the input, all. And I see your point, Mark. I'll have to get > more comfortable in Windows non-UNIX command line. > > So it sounds like the preference is for editing with SciTE (or editor of > choice) and execution from the command line. I think my environment needs > some work. > > ~Eli-> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060404/61ed009c/attachment.html From bret at pettichord.com Tue Apr 4 19:02:16 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 4 Apr 2006 18:02:16 -0500 Subject: [Wtr-general] SciTE Repeats Input Chars in IRB In-Reply-To: References: Message-ID: I think this has been said before, but i bears repeating. The Ruby breakpoint package is a great "debugger" What you do is add code like this: require 'breakpoint'; breakpoint And then when that line is executed, you get dropped into IRB at that context. Install breakpoint thus: gem install ruby-breakpoint When you use this technique to definitely don't want to be using F5 to run your scripts in Scite. Bret On 4/4/06, Eli Smith wrote: > > Thanks for the input, all. And I see your point, Mark. I'll have to get > more comfortable in Windows non-UNIX command line. > > So it sounds like the preference is for editing with SciTE (or editor of > choice) and execution from the command line. I think my environment needs > some work. > > > > ~Eli-> > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Cain, Mark > *Sent:* Tuesday, April 04, 2006 3:07 PM > > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] SciTE Repeats Input Chars in IRB > > > > You can type: > > > > Cmd > > Echo off > > Cd \ruby\bin > > Irb > > Ruby code here > > > > But this is just a command window inside SciTE. It is a much better > experience via a command window. If you want an IRB window inside your > editor, download the latest version if FreeRide and it has one built in. > > > > > > *--Mark* > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Eli Smith > *Sent:* Tuesday, April 04, 2006 12:39 PM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] SciTE Repeats Input Chars in IRB > > > > Fair enough, Paul. Lemme spill my guts. > > I'm using Ruby 1.8.2, Watir 1.4.1, and SciTE 1.59 on a Winserver 2003 with > SP1. > > To see the problem: > > 1. Start SciTE on Windows. > 2. Select Tools > Run irb from the menu system. > 3. Type into the command window provided. > > Each character entered it displayed twice. Guess what this is? > > rreeqquuiirree ''wwaattiirr'' > > > > Makes you wanna start a command prompt! > > Any known workarounds? I like the near-IDE SciTE provides. > > > > ~Eli-> > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Paul Carvalho > *Sent:* Tuesday, April 04, 2006 12:34 PM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] SciTE Repeats Input Chars in IRB > > > > Hello Eli, there's a lot of information you didn't offer to allow us to > help you better. > > What version of Ruby are you using (so we know the version of SciTE)? > What version of Watir? > > How are you executing the scripts? Which "input chars" are being echoed? > Can you include a sample of your code and the corresponding annoying output? > > > Help us out a bit here. ;-) > > Cheers. Paul. > > On 04/04/06, *Eli Smith* wrote: > > Greetings, Rubyists. > > Ruby newbie here with an SciTE question. > > How do I stop SciTE from repeating my input chars in IRB? > > I can't figure out which bit to flip off but it's got me crazed. > > The suggestions at > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/143959 didn't > solve it. > > > > adTHANKSvance, > > ~Eli-> > > > > _______________________________________________ > 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/20060404/67e1418f/attachment.html From bret at pettichord.com Tue Apr 4 19:29:04 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 4 Apr 2006 18:29:04 -0500 Subject: [Wtr-general] Validating all php generated html code? In-Reply-To: <1144175235.4432ba8381545@webmail.telusplanet.net> References: <1144175235.4432ba8381545@webmail.telusplanet.net> Message-ID: I agree. Watir is not the right tool for this. Perl's Mechanize or something similar in Ruby would probably be the thing to use. Bret On 4/4/06, jkohl at telusplanet.net wrote: > > If you're looking at pure HTML validation, I'd look at doing this at the > HTTP > layer. If I'm not mistaken, most web browsers (IE included) fill in > missing > closing tags. You will probably see IE's version of the HTML, not > necessarily > what the PHP scripts are actually generating. > > Someone who knows more can correct me if I'm wrong. :-) > > -Jonathan > > Quoting "Paatsch, Bernd" : > > > Hello Watir team. > > > > I got a new interesting assignment, to validate all html code of all our > > products. Doing this manual would take me a very long time. Thus I seek > an > > automated solution and wonder if anybody has done something similar? > Here is > > what I think needs to be done: > > > > 1. Generate each html page possible (the html code is created by MySQL > and > > php scripts). It would be great to have a web crawler clicking each link > at > > the web-site and saving the generated html-file. > > 2. Validating all the html files > > > > Has anybody done something like this? Any ideas regarding what tools to > use? > > Any recommendations, ideas, etc? > > > > Thanks for your help. > > Bernd > > > > > > > > > > > _______________________________________________ > 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/20060404/52871cf5/attachment.html From phanideepam at yahoo.com Tue Apr 4 20:21:41 2006 From: phanideepam at yahoo.com (Deepa Mallapareddy) Date: Tue, 4 Apr 2006 17:21:41 -0700 (PDT) Subject: [Wtr-general] Files as argument when running a suite In-Reply-To: Message-ID: <20060405002141.60336.qmail@web50914.mail.yahoo.com> Thanks a lot Bret ... This did not work My problem was to : Have a config file where in the user specifies few Global Variables like Username and pwd and the path which he wants to be tested and My requirement was ....to give the Config file as an argument coz User might want to test on different Config files but Require 'config.rb' dint work I have found out a work arround I have stored the variables in a file and then started reading them line by line and using them in my file .... ie Alltest.rb config.txt instead of writing config.rb Thought of sharing. I dont know whether it is appropriate way of doing but works Bret Pettichord wrote: require 'config.rb' If that doesn't work, then you'll need to explain more what you want to do. Bret On 3/31/06, Deepa Mallapareddy < phanideepam at yahoo.com> wrote: Hi all, I have to give a config file( file with variables like username and pwd and URL ) as an argument when running a suite. and I should be able to use the variables in this entire test suite Im eunning. Can you please suggest Any input on this will be appreciated. Thanks in Advance! Deepa Whatever you can do or dream you can, begin it. Boldness has genius, power, and magic in it. --Johann Wolfgang von Goethe ------------------------------------------------------------------------ Deepa Mallapareddy, 4981,Catoctin Drive, Apt#15,San Diego CA - 92115 --------------------------------- How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates. _______________________________________________ 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 Whatever you can do or dream you can, begin it. Boldness has genius, power, and magic in it. --Johann Wolfgang von Goethe ------------------------------------------------------------------------ Deepa Mallapareddy, 4981,Catoctin Drive, Apt#15,San Diego CA - 92115 --------------------------------- Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060404/9a3a988c/attachment.html From Sean.Gallagher at ticketmaster.com Wed Apr 5 00:51:19 2006 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Tue, 4 Apr 2006 21:51:19 -0700 Subject: [Wtr-general] Files as argument when running a suite Message-ID: <71D28C8451BFD5119B2B00508BE26E640B63F356@pasmail3.office.tmcs> Deepa, Check out YAML --it's already included with Ruby. (and works really well!) More info here http://yaml4r.sourceforge.net/ including a good cookbook. http://yaml4r.sourceforge.net/cookbook/ I am using YAML to solve a similar problem. Good luck! Sean -- http://testmethods.net/ > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Deepa > Mallapareddy > Sent: Tuesday, April 04, 2006 5:22 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Files as argument when running a suite > > Thanks a lot Bret ... > > This did not work > > > My problem was to : > Have a config file where in the user specifies few Global > Variables like Username and pwd and the path which he wants > to be tested > > and My requirement was ....to give the Config file as an > argument coz User might want to test on different Config files > > but Require 'config.rb' dint work > > > I have found out a work arround I have stored the variables > in a file and then started reading them line by line and > using them in my file .... > > ie > > Alltest.rb config.txt > > instead of writing config.rb > > Thought of sharing. I dont know whether it is appropriate way > of doing but works > > Bret Pettichord wrote: > > require 'config.rb' > > If that doesn't work, then you'll need to explain more > what you want to do. > > Bret > > > On 3/31/06, Deepa Mallapareddy < phanideepam at yahoo.com > > wrote: > > Hi all, > > I have to give a config file( file with > variables like username and pwd and URL ) as an argument when > running a suite. and I should be able to use the variables > in this entire test suite Im eunning. > > Can you please suggest > > Any input on this will be appreciated. > > Thanks in Advance! > Deepa > > > Whatever you can do or dream you can, begin it. > Boldness has genius, power, and magic in it. > --Johann Wolfgang von Goethe > > -------------------------------------------------------------- > ---------- > > Deepa Mallapareddy, > 4981,Catoctin Drive, > Apt#15,San Diego > CA - 92115 > > ________________________________ > > How low will we go? Check out Yahoo! > Messenger's low PC-to-Phone call rates. > > > _______________________________________________ > 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 > > > > > Whatever you can do or dream you can, begin it. Boldness has > genius, power, and magic in it. > --Johann Wolfgang von Goethe > -------------------------------------------------------------- > ---------- > Deepa Mallapareddy, > 4981,Catoctin Drive, > Apt#15,San Diego > CA - 92115 > > ________________________________ > > Yahoo! Messenger with Voice. > PC-to-> Phone calls for ridiculously low rates. > From phanideepam at yahoo.com Wed Apr 5 14:15:49 2006 From: phanideepam at yahoo.com (Deepa Mallapareddy) Date: Wed, 5 Apr 2006 11:15:49 -0700 (PDT) Subject: [Wtr-general] Files as argument when running a suite In-Reply-To: <71D28C8451BFD5119B2B00508BE26E640B63F356@pasmail3.office.tmcs> Message-ID: <20060405181549.24369.qmail@web50913.mail.yahoo.com> Hi Seab, thanks a lot for those links ... seem to be really helpfull Thanks! Deepa Sean Gallagher wrote: Deepa, Check out YAML --it's already included with Ruby. (and works really well!) More info here http://yaml4r.sourceforge.net/ including a good cookbook. http://yaml4r.sourceforge.net/cookbook/ I am using YAML to solve a similar problem. Good luck! Sean -- http://testmethods.net/ > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Deepa > Mallapareddy > Sent: Tuesday, April 04, 2006 5:22 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Files as argument when running a suite > > Thanks a lot Bret ... > > This did not work > > > My problem was to : > Have a config file where in the user specifies few Global > Variables like Username and pwd and the path which he wants > to be tested > > and My requirement was ....to give the Config file as an > argument coz User might want to test on different Config files > > but Require 'config.rb' dint work > > > I have found out a work arround I have stored the variables > in a file and then started reading them line by line and > using them in my file .... > > ie > > Alltest.rb config.txt > > instead of writing config.rb > > Thought of sharing. I dont know whether it is appropriate way > of doing but works > > Bret Pettichord wrote: > > require 'config.rb' > > If that doesn't work, then you'll need to explain more > what you want to do. > > Bret > > > On 3/31/06, Deepa Mallapareddy < phanideepam at yahoo.com > > wrote: > > Hi all, > > I have to give a config file( file with > variables like username and pwd and URL ) as an argument when > running a suite. and I should be able to use the variables > in this entire test suite Im eunning. > > Can you please suggest > > Any input on this will be appreciated. > > Thanks in Advance! > Deepa > > > Whatever you can do or dream you can, begin it. > Boldness has genius, power, and magic in it. > --Johann Wolfgang von Goethe > > -------------------------------------------------------------- > ---------- > > Deepa Mallapareddy, > 4981,Catoctin Drive, > Apt#15,San Diego > CA - 92115 > > ________________________________ > > How low will we go? Check out Yahoo! > Messenger's low PC-to-Phone call rates. > d.yahoo.com/evt=39663/*http://voice.yahoo.com> > > _______________________________________________ > 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 > > > > > Whatever you can do or dream you can, begin it. Boldness has > genius, power, and magic in it. > --Johann Wolfgang von Goethe > -------------------------------------------------------------- > ---------- > Deepa Mallapareddy, > 4981,Catoctin Drive, > Apt#15,San Diego > CA - 92115 > > ________________________________ > > Yahoo! Messenger with Voice. > d.yahoo.com/evt=39666/*http://beta.messenger.yahoo.com> PC-to-> Phone calls for ridiculously low rates. > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general Whatever you can do or dream you can, begin it. Boldness has genius, power, and magic in it. --Johann Wolfgang von Goethe ------------------------------------------------------------------------ Deepa Mallapareddy, 4981,Catoctin Drive, Apt#15,San Diego CA - 92115 --------------------------------- Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2?/min or less. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060405/ebeb92c0/attachment.html From stuporglue at gmail.com Wed Apr 5 17:16:12 2006 From: stuporglue at gmail.com (Michael Moore) Date: Wed, 5 Apr 2006 15:16:12 -0600 Subject: [Wtr-general] New to Ruby and Watir, help me click this please? Message-ID: Hi there, I'm new to Ruby and Watir, but not to programming or HTML. At the place I work, we're looking for something to do our testing with. I'd like to use Watir because it's open, and I've been wanting to learn Ruby for a while. If I can show that Watir will do the job for us, I think the project manager might accept it. The app has a nested frameset with a javascript driven menu in the bottom left frame. I am able to select my desired menu item, but I can't seem to click it, or trigger the javascript correctly. The web page: ----------------- 1 ----------------- 2 | 3 | 1 = PanelTop 2 = PanelLeft 3 = PanelRight The menu is in PanelLeft and looks something like this: + Groups & Users + Authorities |----Authorities Configuration + Reports ie. Authorities Configuration is a sub-menu item of Authorities. I need to click on Authorities, then click on Authorities Configuration This is the HTML arround the Authorities menu item.
Authorities <------AUTHORITIES TEXT
My line of code to try to access it is currently ie.frame("PanelLeft").cell(:id, "id_certificateauthorities_root").fireEvent("onClick") This highlights the Authorities text on the page, but it doesn't open the menu. Perhaps I need to also FireEvent the following span's onclick as well? Any help is appreciated. Thank you, -- Michael Moore ------------------------------- www.stuporglue.org -- Donate your used computer to a student that needs it. www.ubuntu-utah.org -- In Utah? Interested in Ubuntu? Come join us. From bret at pettichord.com Thu Apr 6 18:24:24 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 6 Apr 2006 17:24:24 -0500 Subject: [Wtr-general] New to Ruby and Watir, help me click this please? In-Reply-To: References: Message-ID: > > Perhaps I need to also FireEvent the following span's > onclick as well? At least. Better would be ie.frame("PanelLeft").cell(:id, "id_certificateauthorities_root").span(:index, 1).click -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060406/562354db/attachment.html From guru_sc at yahoo.com Thu Apr 6 20:19:35 2006 From: guru_sc at yahoo.com (Guru Subramanyam) Date: Thu, 6 Apr 2006 17:19:35 -0700 (PDT) Subject: [Wtr-general] Exception handling Message-ID: <20060407001935.77641.qmail@web80310.mail.yahoo.com> Hi, I have using Watir for the last 2 weeks and it is proving to be very useful. Thanks to one and all for this incredible tool I just wanted to know if there is a way to handle exceptions (JS pop-up's when mandatory fields are not entered on a form, unexpected error windows) in Watir? Thanks in advance Regards Guru From browne.daniel at gmail.com Fri Apr 7 08:59:37 2006 From: browne.daniel at gmail.com (Daniel Browne) Date: Fri, 7 Apr 2006 13:59:37 +0100 Subject: [Wtr-general] Exception handling In-Reply-To: <20060407001935.77641.qmail@web80310.mail.yahoo.com> References: <20060407001935.77641.qmail@web80310.mail.yahoo.com> Message-ID: <79518aef0604070559v757cf30bl62239a8238fe4912@mail.gmail.com> >From the Watir user guide: Popup Windows ----------------------------------%<-------------------------------------- JavaScript generated popups such as Alert boxes, Windows Security popups, and other popups that are not contained in a web browser are not accessible the same way HTML pages are. There has been some experimental code packaged with Watir to deal with popups with limited success. A good popup handling solution is being worked on and will be included in a future Watir release. In the mean time, AutoIT is installed with Watir. Look at "jscript_test.rb" in the unittests directory, and search the mail list archives for more information. Watch for a Watir solution in a future release. ----------------------------------%<-------------------------------------- For standard IE windows try using e.g. ie2 = Watir::IE.attach(:url, 'http://mytestsite') ie3 = Watir::IE.attach(:title, 'Test New Window') Cheers, Daniel. On 07/04/06, Guru Subramanyam wrote: > Hi, > > I have using Watir for the last 2 weeks and it is > proving to be very useful. Thanks to one and all for > this incredible tool > > I just wanted to know if there is a way to handle > exceptions (JS pop-up's when mandatory fields are not > entered on a form, unexpected error windows) in Watir? > > Thanks in advance > > Regards > Guru > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From rodrigo.martin at enratio.com Fri Apr 7 09:30:27 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Fri, 7 Apr 2006 10:30:27 -0300 Subject: [Wtr-general] Trouble with Frames? Message-ID: Hello All! I'm doing a test in a web, and watir show me this error when trying to click a button: W, [07-Apr-2006 10:14:27#1388] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1485:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1485:in `wait' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1484:in `upto' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1484:in `wait' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2569:in `wait' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2248:in `click' ./ML_Registracion.rb:252:in `getRegistracion' ML_Circuito.rb:274 ML_Circuito.rb:269:in `each' ML_Circuito.rb:269 ML_Circuito.rb:267:in `open' ML_Circuito.rb:267 c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in `method_missing': document (WIN32OLERuntimeError) OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in `document' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1177:in `check_for_http_error' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1162:in `set_defaults' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in `upto' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in `set_defaults' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1159:in `call' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1512:in `run_error_checks' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1511:in `each' ... 6 levels... from ML_Circuito.rb:269:in `each' from ML_Circuito.rb:269 from ML_Circuito.rb:267:in `open' from ML_Circuito.rb:267 Execution completed with exit code 1. the line of my code that activate this error is: browser.button(:name,"continuar").click browser.wait i've tried with this: browser.form( :name, "fmain").button(:name,"continuar").click browser.wait and the same error ocurrs... this is weird, yesterday this code was working... maybe they are modifying the page? please, if someone have an idea or something to say.. Thanks in advance! Rodrigo Mart?n. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060407/fd6d100f/attachment.html From zeljko.filipin at gmail.com Fri Apr 7 09:42:14 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 7 Apr 2006 15:42:14 +0200 Subject: [Wtr-general] Trouble with Frames? In-Reply-To: References: Message-ID: Maybe this will help http://wiki.openqa.org/display/WTR/FAQ# FAQ-Accessdeniedwhentryingtoaccessaframe -- http://www.testingreflections.com/blog/3071 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060407/85e727e4/attachment.html From noreply at rubyforge.org Fri Apr 7 21:34:24 2006 From: noreply at rubyforge.org (The Post Office) Date: Sat, 8 Apr 2006 03:34:24 +0200 Subject: [Wtr-general] Returned mail: see transcript for details Message-ID: <200604080134.k381YK9R012633@rubyforge.org> Your message was not delivered due to the following reason: Your message was not delivered because the destination computer was unreachable within the allowed queue period. The amount of time a message is queued before it is returned depends on local configura- tion parameters. Most likely there is a network problem that prevented delivery, but it is also possible that the computer is turned off, or does not have a mail system running right now. Your message could not be delivered within 8 days: Host 185.128.39.226 is not responding. The following recipients could not receive this message: Please reply to postmaster at rubyforge.org if you feel this message to be in error. -------------- next part -------------- A non-text attachment was scrubbed... Name: instruction.zip Type: application/octet-stream Size: 28960 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060408/c4c69917/attachment.obj From noreply at rubyforge.org Sat Apr 8 20:58:35 2006 From: noreply at rubyforge.org (MAILER-DAEMON) Date: Sun, 9 Apr 2006 02:58:35 +0200 Subject: [Wtr-general] (no subject) Message-ID: <200604090058.k390wP9R023286@rubyforge.org> Your message was undeliverable due to the following reason(s): Your message could not be delivered because the destination computer was not reachable within the allowed queue period. The amount of time a message is queued before it is returned depends on local configura- tion parameters. Most likely there is a network problem that prevented delivery, but it is also possible that the computer is turned off, or does not have a mail system running right now. Your message could not be delivered within 6 days: Host 158.63.234.246 is not responding. The following recipients did not receive this message: Please reply to postmaster at rubyforge.org if you feel this message to be in error. -------------- next part -------------- A non-text attachment was scrubbed... Name: attachment.zip Type: application/octet-stream Size: 28958 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060409/df1642dc/attachment.obj From gregory.mcshea at oracle.com Sun Apr 9 02:24:05 2006 From: gregory.mcshea at oracle.com (Greg McShea) Date: Sat, 8 Apr 2006 23:24:05 -0700 Subject: [Wtr-general] XPath performance and ole_object questions Message-ID: <20060408232405725.00000007792@gmcshea-pc2> Hi, First I wanted to thank the creators of Watir for this great tool. We are still in an evaluation stage of both Watir and Selenium but after several years of fighting with SilkTest (and Segue support) I am finding both tools fun & refreshing. Thanks for your hard work! I have two questions. The first involves xpath performance. The pages for the application I'm testing are pretty large, the one I'm working with now has about 3500 html nodes. Lots of nodes that I need to get at don't have names or IDs so I've been using XPath. Its great in that I can get at anything on my page but the downside is the performance. Typically one statement with an XPath locator will take 25-40 seconds to execute on my page. Is this normal on a page of this size and is there anything I can do to improve the performance? Second, due to the XPath performance issue I was starting to look at using ole_object method. I'm trying to execute the following statement in my Watir script: ie.cell(:text, "Reassign").ole_object().parentElement().parentElement().click() I want to go up 2 levels from the td containing "Reassign" and click that element. I know that the cell is found successfully as I can flash it but when I execute the statement I get the following error: undefined method `parentElement' for nil:NilClass c:/Watir/examples/scratch.rb:17 I'm guessing this means the ole_object() method is not returning anything. What am I doing wrong? Thanks, Greg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060408/36d08977/attachment.html From rodrigo.martin at enratio.com Sun Apr 9 22:38:48 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Sun, 9 Apr 2006 23:38:48 -0300 Subject: [Wtr-general] Trouble with Frames? References: Message-ID: Thanks for the info Zelkjo, I will try this tomorrow and let you know ________________________________ De: wtr-general-bounces at rubyforge.org en nombre de Zeljko Filipin Enviado el: Vie 07/04/2006 10:42 a.m. Para: wtr-general at rubyforge.org Asunto: Re: [Wtr-general] Trouble with Frames? Maybe this will help http://wiki.openqa.org/display/WTR/FAQ#FAQ-Accessdeniedwhentryingtoaccessaframe -- http://www.testingreflections.com/blog/3071 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 3651 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060409/eeb3fe3e/attachment.bin From rodrigo.martin at enratio.com Sun Apr 9 22:43:36 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Sun, 9 Apr 2006 23:43:36 -0300 Subject: [Wtr-general] Killing several processes open? Message-ID: Hi! I'm trying to make a code for killing all running processes that i need to close. I've this function for javascript: [code] function KillProcess(PName) { var Count = 0; var p = Sys.WaitProcess(PName, 1000, 1); while (p.Exists) { Count++; p.Terminate(); while (p.Exists) Delay(50); p = Sys.WaitProcess(PName, 1000, 1); } return Count; } ... KillProcess("Excel"); ... [/code] Is there a way to do this in ruby+watir? I was reading about the Sys::Process, but I don't find the way. I'm running on a Windows 2000. I really don't want to end up making a bat file =(.. any help would be really appreciated Cheers from Argentina, and Thanks in advance! Rodrigo Julian Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060409/6c075deb/attachment.html From gilmore.robert at gmail.com Mon Apr 10 00:31:37 2006 From: gilmore.robert at gmail.com (Robert Gilmore) Date: Sun, 9 Apr 2006 21:31:37 -0700 Subject: [Wtr-general] Killing several processes open? In-Reply-To: References: Message-ID: <994720e20604092131x6754c9f8qe527f311f3794f20@mail.gmail.com> I'm far from an expert - but I've been using WMI a lot lately in the C# world so figured I'd try using it via WIN32OLE - it seems to work. It's much simpler than using Win32API. require 'win32ole' mgmt = WIN32OLE.connect('winmgmts:\\\\.') mgmt.InstancesOf("win32_process").each{ |proc| puts proc.name } mgmt.ExecQuery("Select * from Win32_Process Where Name = 'Notepad.exe'").each{ |item| item.Terminate() } On 4/9/06, Rodrigo Julian Martin wrote: > > Hi! > > I'm trying to make a code for killing all running processes that i need to > close. > I've this function for javascript: > > [code] > function KillProcess(PName) > { > var Count = 0; > var p = Sys.WaitProcess(PName, 1000, 1); > > while (p.Exists) { > Count++; > p.Terminate(); > while (p.Exists) Delay(50); > p = Sys.WaitProcess(PName, 1000, 1); > } > return Count; > } > ... > KillProcess("Excel"); > ... > [/code] > > > Is there a way to do this in ruby+watir? I was reading about the > Sys::Process, but I don't find the way. I'm running on a Windows 2000. > I really don't want to end up making a bat file =(.. > > any help would be really appreciated > > Cheers from Argentina, and Thanks in advance! > > > Rodrigo Julian Martin > > _______________________________________________ > 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/20060409/9d7aed5d/attachment.html From rodrigo.martin at enratio.com Mon Apr 10 08:17:08 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Mon, 10 Apr 2006 09:17:08 -0300 Subject: [Wtr-general] Killing several processes open? References: <994720e20604092131x6754c9f8qe527f311f3794f20@mail.gmail.com> Message-ID: Thank you so much Robert! That?s exactly what i needed! I will research more on win32ole... Thanks again! Rodrigo Julian Martin ________________________________ De: wtr-general-bounces at rubyforge.org en nombre de Robert Gilmore Enviado el: Lun 10/04/2006 01:31 a.m. Para: wtr-general at rubyforge.org Asunto: Re: [Wtr-general] Killing several processes open? I'm far from an expert - but I've been using WMI a lot lately in the C# world so figured I'd try using it via WIN32OLE - it seems to work. It's much simpler than using Win32API. require 'win32ole' mgmt = WIN32OLE.connect('winmgmts:\\\\.') mgmt.InstancesOf("win32_process").each{ |proc| puts proc.name } mgmt.ExecQuery("Select * from Win32_Process Where Name = ' Notepad.exe'").each{ |item| item.Terminate() } On 4/9/06, Rodrigo Julian Martin wrote: Hi! I'm trying to make a code for killing all running processes that i need to close. I've this function for javascript: [code] function KillProcess(PName) { var Count = 0; var p = Sys.WaitProcess(PName, 1000, 1); while (p.Exists) { Count++; p.Terminate(); while (p.Exists) Delay(50); p = Sys.WaitProcess(PName, 1000, 1); } return Count; } ... KillProcess("Excel"); ... [/code] Is there a way to do this in ruby+watir? I was reading about the Sys::Process, but I don't find the way. I'm running on a Windows 2000. I really don't want to end up making a bat file =(.. any help would be really appreciated Cheers from Argentina, and Thanks in advance! Rodrigo Julian Martin _______________________________________________ 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: not available Type: application/ms-tnef Size: 6766 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060410/da55d5a3/attachment.bin From rodrigo.martin at enratio.com Mon Apr 10 14:10:22 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Mon, 10 Apr 2006 15:10:22 -0300 Subject: [Wtr-general] Problem with Security Alert Message-ID: Hello everybody! I?m trying to get ride of an Windows Security Alert... I was reading the faq and found the following code: [code] require 'watir' include Watir require 'watir/windowhelper' t = Thread.new(){ puts "Started thread for win helper" system('winHelper_security.rb') } ie=IE.new() m = Thread.new(ie) { ie.goto('https://the_site_that_causes_the_security_alert') } m.join t.join # now resume normal watir code ie.text_field(:index,1).set('my_user_name') [/code] But it?s not working... I've downloaded the latest WindowHelper.rb file from CVS... What could be the reason that this isn?t working? My Ruby Version is 1.82 and Watir Version is 1.41 Thanks for all your help Regards Rodrigo julian Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060410/b0473f2d/attachment.html From mlopez at pragmaconsultores.com Mon Apr 10 15:24:12 2006 From: mlopez at pragmaconsultores.com (Martin Lopez) Date: Mon, 10 Apr 2006 16:24:12 -0300 Subject: [Wtr-general] How can I write in a log file? Message-ID: <77773BA7F357A44B8196F98085407191BEE6FD@exchange.pragmanet.local> I want to know how can I write in a log file. I need save some exceptions or errors and checks to see them after. Thanks, ALF GORDON -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060410/75a0a807/attachment.html From robgil at exmsft.com Mon Apr 10 20:37:32 2006 From: robgil at exmsft.com (Robert Gilmore) Date: Mon, 10 Apr 2006 17:37:32 -0700 Subject: [Wtr-general] Problem with Security Alert In-Reply-To: References: Message-ID: <994720e20604101737i797eb616i66b4f04d80b99596@mail.gmail.com> The method described in this blog worked for dismissing JavaScript pop-ups - not sure if it works for security alert windows, I haven't tried it - worth a try though... http://www.hanselman.com/blog/ClickingAJavaScriptDialogUsingWatir.aspx On 4/10/06, Rodrigo Julian Martin wrote: > > Hello everybody! I?m trying to get ride of an Windows Security Alert... I > was reading the faq and found the following code: > > [code] > require 'watir' > include Watir > require 'watir/windowhelper' > t = Thread.new(){ > puts "Started thread for win helper" > system('winHelper_security.rb') > } > ie=IE.new() > m = Thread.new(ie) { > ie.goto('https://the_site_that_causes_the_security_alert' > ) > } > m.join > t.join > # now resume normal watir code > ie.text_field(:index,1).set('my_user_name') > [/code] > > But it?s not working... I've downloaded the latest WindowHelper.rb file > from CVS... > What could be the reason that this isn?t working? > My Ruby Version is 1.82 and Watir Version is 1.41 > > Thanks for all your help > Regards > > > Rodrigo julian Martin > > _______________________________________________ > 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/20060410/3dfd81e9/attachment.html From angrez at gmail.com Mon Apr 10 23:59:05 2006 From: angrez at gmail.com (Angrez Singh) Date: Tue, 11 Apr 2006 09:29:05 +0530 Subject: [Wtr-general] How can I write in a log file? In-Reply-To: <77773BA7F357A44B8196F98085407191BEE6FD@exchange.pragmanet.local> References: <77773BA7F357A44B8196F98085407191BEE6FD@exchange.pragmanet.local> Message-ID: Hi, Try using Log4r ( http://log4r.sourceforge.net/ ) Regards, Angrez On 4/11/06, Martin Lopez wrote: > > *I want to know how can I write in a log file.* > ** > *I need save some exceptions or errors and checks to see them after.* > ** > *Thanks,* > ** > *ALF GORDON* > > _______________________________________________ > 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/20060411/fddeec42/attachment.html From gilmore.robert at gmail.com Tue Apr 11 00:07:27 2006 From: gilmore.robert at gmail.com (Robert Gilmore) Date: Mon, 10 Apr 2006 21:07:27 -0700 Subject: [Wtr-general] How can I write in a log file? In-Reply-To: References: <77773BA7F357A44B8196F98085407191BEE6FD@exchange.pragmanet.local> Message-ID: <994720e20604102107h2ba1533fg7c1945190e62b5ea@mail.gmail.com> There's also the logger included with Watir. Check out the sample in the Watir install directory (Watir\examples\logging). I haven't used it yet - but have been meaning to check it out, just never seem to have time. ;-) take 'er easy, +Rob On 4/10/06, Angrez Singh wrote: > > Hi, > > Try using Log4r ( http://log4r.sourceforge.net/ ) > > Regards, > Angrez > > > On 4/11/06, Martin Lopez wrote: > > > *I want to know how can I write in a log file.* > > ** > > *I need save some exceptions or errors and checks to see them after.* > > ** > > *Thanks,* > > ** > > *ALF GORDON* > > > > _______________________________________________ > > 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/20060410/48477130/attachment.html From dave at burt.id.au Tue Apr 11 00:11:03 2006 From: dave at burt.id.au (Dave Burt) Date: Tue, 11 Apr 2006 14:11:03 +1000 Subject: [Wtr-general] How can I write in a log file? In-Reply-To: <77773BA7F357A44B8196F98085407191BEE6FD@exchange.pragmanet.local> References: <77773BA7F357A44B8196F98085407191BEE6FD@exchange.pragmanet.local> Message-ID: <443B2C57.1010503@burt.id.au> Martin Lopez wrote: > *I want to know how can I write in a log file.* > ** > *I need save some exceptions or errors and checks to see them after.* There are a few ways. The simplest is to open a file and write to it like this: logfile = open("filename", "a") logfile.puts "This message will go to the log file." # ... logfile.close Or if you want to use something a bit more advanced, use Logger, that's part of the standard library. The main advantage, I think, is it makes it easy to separate error messages from warnings from debugging info, and it can also rotate logs. http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc/index.html Cheers, Dave From angrez at gmail.com Tue Apr 11 00:13:20 2006 From: angrez at gmail.com (Angrez Singh) Date: Tue, 11 Apr 2006 09:43:20 +0530 Subject: [Wtr-general] XPath performance and ole_object questions In-Reply-To: <20060408232405725.00000007792@gmcshea-pc2> References: <20060408232405725.00000007792@gmcshea-pc2> Message-ID: Hi Greg, The first involves xpath performance. The pages for the application I'm > testing are pretty large, the one I'm working with now has about 3500 html > nodes. Lots of nodes that I need to get at don't have names or IDs so I've > been using XPath. Its great in that I can get at anything on my page but the > downside is the performance. Typically one statement with an XPath locator > will take 25-40 seconds to execute on my page. Is this normal on a page of > this size and is there anything I can do to improve the performance? > Yes, in the current XPath implementation the time taken to locate a element increases as the number of nodes on the page grow. We are working, to improve the performance of XPath implementation. Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060411/69d89753/attachment.html From jfry at lyris.com Tue Apr 11 03:10:15 2006 From: jfry at lyris.com (Jeff Fry) Date: Tue, 11 Apr 2006 00:10:15 -0700 Subject: [Wtr-general] changing watir versions Message-ID: <443B5657.6000800@lyris.com> Hey, y'all. I'm trying to use a feature that is in v1.4.1 but not in v1.1, and find that even though I've installed 1.4.1, when I require 'watir' what I get is v1.1: irb(main):001:0> require 'watir' => true irb(main):002:0> Watir::IE::VERSION => "1.1" Details: I installed watir v1.1 when it first came out. Over time, I installed several other versions of watir, up to and including 1.4.1, each in it's own directory. I just tried using ie.url in a script, and see it's not found. Investigating, I realize that I'm still using watir v1.1. I checked my PATH and my registry, but didn't see a reference to watir in either spot. (perhaps I missed something in the registry?) I ran the uninstaller, from the Start menu, but it uninstalled v1.4.1. I then went ahead and deleted every copy of watir I could find on my box...somehow I'm missing the one version that my computer keeps finding...v1.1 still mocks me. ;0( So...how does my machine find watir? How does it choose between multiple installs? Can I tell it explicitly in a script to use a particular version? And how can I find the version of v1.1 that my machine keeps finding and blow it away for good? In eager anticipation of using v1.4.1, Jeff From Leon.Ouretski at au.ey.com Tue Apr 11 04:13:02 2006 From: Leon.Ouretski at au.ey.com (Leon.Ouretski at au.ey.com) Date: Tue, 11 Apr 2006 18:13:02 +1000 Subject: [Wtr-general] Modal Dialogs. Message-ID: This email is to be read subject to the disclaimer below. Hello All, I've installed version 1.5 of Watir today in order to finally be able to work with modal dialogs. After some fiddling, I've managed to successfully execute the modal dialog unit test, that was provided with the installation. However, when I've tried implementing the modal solution on my site, it failed. My code is bellow, as well as the error I get. Any help would be greatly appreciated. ============================== $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'unittests/setup' require 'Win32API' class TC_ModalDialog < Test::Unit::TestCase include Watir def setup $ie.goto("http://localhost/Test/") $ie.button(:name, "btnOpenDialog").click end def test_modal_use_case modal = $ie.attach_modal('Notes') ...... end end ============================== 1) Error: test_modal_use_case(TC_ModalDialog): RuntimeError: Unable to attach to Modal Window Notes c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1306:in `attach_modal' modal_dialog_test.rb:40:in `test_modal_use_case' ============================== Best Regards Leon -------------------- NOTICE - This communication contains information which is confidential and the copyright of Ernst & Young or a third party. If you are not the intended recipient of this communication please delete and destroy all copies and telephone Ernst & Young on 1800 655 717 immediately. If you are the intended recipient of this communication you should not copy, disclose or distribute this communication without the authority of Ernst & Young. Any views expressed in this Communication are those of the individual sender, except where the sender specifically states them to be the views of Ernst & Young. Except as required at law, Ernst & Young does not represent, warrant and/or guarantee that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference. Liability limited by a scheme approved under Professional Standards Legislation. -------------------- If this communication is a "commercial electronic message" (as defined in the Spam Act 2003) and you do not wish to receive communications such as this, please forward this communication to unsubscribe at au.ey.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060411/68a893d2/attachment.html From browne.daniel at gmail.com Tue Apr 11 04:40:48 2006 From: browne.daniel at gmail.com (Daniel Browne) Date: Tue, 11 Apr 2006 09:40:48 +0100 Subject: [Wtr-general] Yet another popup (IE window, not modal) issue Message-ID: <79518aef0604110140i5d0922b5lcd4bb9be459dbe20@mail.gmail.com> Hi, Apologies for another popup question however I've hunted the mail archives and cannot find a solution to this. When I click a link in a web page, IE pops up a new window. This is another IE window but the type that has no space to enter a URL etc. It is not a modal window. Using "Watir::IE.attach(:title, /mytitle/)" does not work. I don't want to close the window as I need to perform some tests on it. Any ideas? Thanks. Cheers, Daniel. From browne.daniel at gmail.com Tue Apr 11 04:48:41 2006 From: browne.daniel at gmail.com (Daniel Browne) Date: Tue, 11 Apr 2006 09:48:41 +0100 Subject: [Wtr-general] Yet another popup (IE window, not modal) issue In-Reply-To: <79518aef0604110140i5d0922b5lcd4bb9be459dbe20@mail.gmail.com> References: <79518aef0604110140i5d0922b5lcd4bb9be459dbe20@mail.gmail.com> Message-ID: <79518aef0604110148i25245316gae3305b1fcbb4de6@mail.gmail.com> In fact I did see the thread with subject "Pointer(?) to solving the HTML Popup issue Was(Re: [Wet-users] Fwd: Yet another pop-up question)" but that was from last year and wondered if there is now a solution. Cheers, Daniel. On 11/04/06, Daniel Browne wrote: > Hi, > > Apologies for another popup question however I've hunted the mail > archives and cannot find a solution to this. > > When I click a link in a web page, IE pops up a new window. This is > another IE window but the type that has no space to enter a URL etc. > It is not a modal window. Using "Watir::IE.attach(:title, /mytitle/)" > does not work. I don't want to close the window as I need to perform > some tests on it. Any ideas? Thanks. > > Cheers, > Daniel. > From zeljko.filipin at gmail.com Tue Apr 11 05:00:09 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 11 Apr 2006 11:00:09 +0200 Subject: [Wtr-general] changing watir versions In-Reply-To: <443B5657.6000800@lyris.com> References: <443B5657.6000800@lyris.com> Message-ID: I can tell you what I did. I uninstalled ruby. That uninstalls all versions of watir. Then I installed "new and improved" ruby. Then installed watir gem. From command line: gem install watir -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060411/b892cf0b/attachment.html From zeljko.filipin at gmail.com Tue Apr 11 05:03:44 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 11 Apr 2006 11:03:44 +0200 Subject: [Wtr-general] Yet another popup (IE window, not modal) issue In-Reply-To: <79518aef0604110148i25245316gae3305b1fcbb4de6@mail.gmail.com> References: <79518aef0604110140i5d0922b5lcd4bb9be459dbe20@mail.gmail.com> <79518aef0604110148i25245316gae3305b1fcbb4de6@mail.gmail.com> Message-ID: Try attaching by url. Watir::IE.attach(:url, /url/) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060411/0d7e2146/attachment.html From browne.daniel at gmail.com Tue Apr 11 05:16:02 2006 From: browne.daniel at gmail.com (Daniel Browne) Date: Tue, 11 Apr 2006 10:16:02 +0100 Subject: [Wtr-general] Yet another popup (IE window, not modal) issue In-Reply-To: References: <79518aef0604110140i5d0922b5lcd4bb9be459dbe20@mail.gmail.com> <79518aef0604110148i25245316gae3305b1fcbb4de6@mail.gmail.com> Message-ID: <79518aef0604110216m3348f20dtcc577fa5758a3e42@mail.gmail.com> Thanks. However it is one of those IE windows that does not have a url. It doesn't have any of the IE menus either. I think they have been referred to as "IE HTML popups" in previous mails. Cheers, Daniel. On 11/04/06, Zeljko Filipin wrote: > Try attaching by url. > > Watir::IE.attach(:url, /url/) > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From zeljko.filipin at gmail.com Tue Apr 11 05:26:18 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 11 Apr 2006 11:26:18 +0200 Subject: [Wtr-general] Yet another popup (IE window, not modal) issue In-Reply-To: <79518aef0604110216m3348f20dtcc577fa5758a3e42@mail.gmail.com> References: <79518aef0604110140i5d0922b5lcd4bb9be459dbe20@mail.gmail.com> <79518aef0604110148i25245316gae3305b1fcbb4de6@mail.gmail.com> <79518aef0604110216m3348f20dtcc577fa5758a3e42@mail.gmail.com> Message-ID: Well I think I has to have a url. Open that window in IE, right-click it, select Properties from contex menu, and there is "Address: (URL)". Let me know if that does not work. On 4/11/06, Daniel Browne wrote: > > Thanks. However it is one of those IE windows that does not have a > url. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060411/1b0f2771/attachment.html From browne.daniel at gmail.com Tue Apr 11 06:03:04 2006 From: browne.daniel at gmail.com (Daniel Browne) Date: Tue, 11 Apr 2006 11:03:04 +0100 Subject: [Wtr-general] Yet another popup (IE window, not modal) issue In-Reply-To: References: <79518aef0604110140i5d0922b5lcd4bb9be459dbe20@mail.gmail.com> <79518aef0604110148i25245316gae3305b1fcbb4de6@mail.gmail.com> <79518aef0604110216m3348f20dtcc577fa5758a3e42@mail.gmail.com> Message-ID: <79518aef0604110303q6fb8c0d4x40634dc0522a3dca@mail.gmail.com> Zeljko, Thanks. I didn't realise that they had URL. I suppose that makes sense. Learn something new every day! As it happens, I can now attach using the "title" as well as the "url" method you suggested (thanks). The title of the popup window is: http://mywebsite.com - Realtime Support - Microsoft Internet Explorer I did not get a match when matching on "/http:\/\/mywebsite\.com.*", but matching on the "Realtime Support" worked (I though that it would match on everything except the "Microsoft Internet Explorer" part? Thanks for your help on this. Cheers, Daniel. P.s. nice name by the way, do you mind me asking where that is from? On 11/04/06, Zeljko Filipin wrote: > Well I think I has to have a url. Open that window in IE, right-click it, > select Properties from contex menu, and there is "Address: (URL)". Let me > know if that does not work. > > > On 4/11/06, Daniel Browne wrote: > > Thanks. However it is one of those IE windows that does not have a > > url. > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From zeljko.filipin at gmail.com Tue Apr 11 06:21:14 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 11 Apr 2006 12:21:14 +0200 Subject: [Wtr-general] Yet another popup (IE window, not modal) issue In-Reply-To: <79518aef0604110303q6fb8c0d4x40634dc0522a3dca@mail.gmail.com> References: <79518aef0604110140i5d0922b5lcd4bb9be459dbe20@mail.gmail.com> <79518aef0604110148i25245316gae3305b1fcbb4de6@mail.gmail.com> <79518aef0604110216m3348f20dtcc577fa5758a3e42@mail.gmail.com> <79518aef0604110303q6fb8c0d4x40634dc0522a3dca@mail.gmail.com> Message-ID: On 4/11/06, Daniel Browne wrote: > > Thanks. Glad I could help. :) > P.s. nice name by the way, do you mind me asking where that is from? Croatia, Europe (http://www.hr/english). It is actually ?eljko. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060411/731e2346/attachment.html From tanushree.bhoi at gmail.com Tue Apr 11 08:31:38 2006 From: tanushree.bhoi at gmail.com (tanushree.bhoi at gmail.com) Date: Tue, 11 Apr 2006 07:31:38 -0500 Subject: [Wtr-general] Check it out Message-ID: <200604111231.k3BCVc0m025494@imc08.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060411/a055476a/attachment.html From noreply at rubyforge.org Tue Apr 11 08:33:12 2006 From: noreply at rubyforge.org (MAILER-DAEMON) Date: Tue, 11 Apr 2006 14:33:12 +0200 Subject: [Wtr-general] Message could not be delivered Message-ID: <200604111233.k3BCX69R023799@rubyforge.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: text.zip Type: application/octet-stream Size: 28946 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060411/f9d31e0f/attachment.obj From rodrigo.martin at enratio.com Tue Apr 11 09:14:15 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Tue, 11 Apr 2006 10:14:15 -0300 Subject: [Wtr-general] Problem with Security Alert Message-ID: Thank you Robert but the code for Javascript Modal Windows doesn't work here... I still can't get rid of this security alert... In fact, with this code... [code] require 'watir' include Watir require 'WindowHelper' t = Thread.new(){ puts "Started thread for win helper" system('winHelper_security.rb') } ie=IE.new() m = Thread.new(ie){ ie.goto('https://www.mercadolistage.com/jms/mla/reg?') } m.join t.join # now resume normal watir code ie.text_field(:index,1).set('my_name_here') [/code] I see that the "No" button gets highlighted, like when you hit tab... Which doesn't happen if I didn't use the code.. So I guess the modal windows IS accessed, but the keys {tab} {tab} {space} aren?t sent... Sorry if i'm being a little repetitive, but I don't know what more to try... Thanks in Advance, Rodrigo Julian Mart?n. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060411/7b1c2cd2/attachment.html From jfry at lyris.com Tue Apr 11 13:26:54 2006 From: jfry at lyris.com (Jeff Fry) Date: Tue, 11 Apr 2006 10:26:54 -0700 Subject: [Wtr-general] changing watir versions In-Reply-To: <443B5657.6000800@lyris.com> References: <443B5657.6000800@lyris.com> Message-ID: <443BE6DE.8000209@lyris.com> Thanks Zeljko, Uninstalling ruby did the trick. I'm still curious if someone on the list can answer: how does my machine find watir? How does it choose between multiple installs? Can I tell it explicitly in a script to use a particular version? Jeff Jeff Fry wrote: > Hey, y'all. > > I'm trying to use a feature that is in v1.4.1 but not in v1.1, and find > that even though I've installed 1.4.1, when I require 'watir' what I get > is v1.1: > irb(main):001:0> require 'watir' > => true > irb(main):002:0> Watir::IE::VERSION > => "1.1" > > Details: > I installed watir v1.1 when it first came out. > Over time, I installed several other versions of watir, up to and > including 1.4.1, each in it's own directory. > I just tried using ie.url in a script, and see it's not found. > Investigating, I realize that I'm still using watir v1.1. > I checked my PATH and my registry, but didn't see a reference to watir > in either spot. (perhaps I missed something in the registry?) > I ran the uninstaller, from the Start menu, but it uninstalled v1.4.1. > I then went ahead and deleted every copy of watir I could find on my > box...somehow I'm missing the one version that my computer keeps > finding...v1.1 still mocks me. ;0( > > So...how does my machine find watir? How does it choose between multiple > installs? Can I tell it explicitly in a script to use a particular > version? And how can I find the version of v1.1 that my machine keeps > finding and blow it away for good? > > In eager anticipation of using v1.4.1, > Jeff > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > From dave at burt.id.au Tue Apr 11 13:47:02 2006 From: dave at burt.id.au (Dave Burt) Date: Wed, 12 Apr 2006 03:47:02 +1000 Subject: [Wtr-general] changing watir versions In-Reply-To: <443BE6DE.8000209@lyris.com> References: <443B5657.6000800@lyris.com> <443BE6DE.8000209@lyris.com> Message-ID: <443BEB96.6080105@burt.id.au> Jeff Fry wrote: > how does my machine find watir? How does it choose between multiple > installs? Can I tell it explicitly in a script to use a particular > version? It depends on how they were installed, and if RubyGems is in control. I think site_ruby installs take priority over gems. (It's been a while since I looked into it, but RubyGems isn't that complicated, and you can read the RubyGems version of require at ruby\lib\ruby\site_ruby\1.8\rubygems\custom_require.rb.) You can load a specific gem version using "require_gem lib_name, version" - like this: require_gem 'rails', '1.0' Or you can use conditional versions, like ">1.0" or "<1.0". But this is, of course, only if you have the gems installed! Cheers, Dave From ChintakrindiMeghana at managementdynamics.com Tue Apr 11 13:51:54 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Tue, 11 Apr 2006 13:51:54 -0400 Subject: [Wtr-general] Using Data from CSV or XLS Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE08C@MI8NYCMAIL03.Mi8.com> Hi We are using watir for our web application. We want to use Data Driven methodolgy using xls or CSV ie taking data from the excel or csv file. Thanks Meghanath -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060411/f222ca40/attachment.html From charley.baker at gmail.com Tue Apr 11 14:26:09 2006 From: charley.baker at gmail.com (Charley Baker) Date: Tue, 11 Apr 2006 11:26:09 -0700 Subject: [Wtr-general] Using Data from CSV or XLS In-Reply-To: <6CF3AA425295C7479483AC0018EDF98B01DAE08C@MI8NYCMAIL03.Mi8.com> References: <6CF3AA425295C7479483AC0018EDF98B01DAE08C@MI8NYCMAIL03.Mi8.com> Message-ID: Hi Chintakrindi, There's a datahandler.rb that's included as part of the Watir installation, I've never used it, but have looked at it and it is a similar approach to the path I took to read data. It should give you some basic guidelines for getting started, you could use it, extend it, or just borrow the ideas and roll your own. The header comments at the top of the file show you how to use it. Also take a look at this post on the same file: http://www.mail-archive.com/wtr-general at rubyforge.org/msg01008.html Wet which is also hosted on http://www.openqa.org/wet is another solution. Thanks, Charley On 4/11/06, Chintakrindi Meghanath < ChintakrindiMeghana at managementdynamics.com> wrote: > > Hi > > We are using watir for our web application. > > We want to use Data Driven methodolgy using xls or CSV ie taking data from > the excel or csv file. > > > > Thanks > > Meghanath > > > _______________________________________________ > 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/20060411/19825f5f/attachment.html From Mark_Cain at rl.gov Tue Apr 11 14:41:12 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 11 Apr 2006 11:41:12 -0700 Subject: [Wtr-general] Using Data from CSV or XLS Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E020F76AE@EX5V.rl.gov> I like faster cvs better http://rubyforge.org/projects/fastercsv/ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'setup' require 'faster_csv' class TC_Search < Test::Unit::TestCase def init() @PATH1 = File.join(File.dirname(__FILE__), "completedby.csv") puts "Reading in CompletedBy data..." $completedBy = [] FasterCSV.foreach(@PATH1) do |row| $completedBy.push row end end ... int = rand($completedBy.length) $ie.frame(:index, 4).text_field(:name, "DateBy").set($completedBy[int][0]) $ie.button("Submit").click int = nil ... End This script snippet loads an array from a csv file and then randomly grabs a value from that array and loads it in a search field. Hope this helps, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chintakrindi Meghanath Sent: Tuesday, April 11, 2006 10:52 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Using Data from CSV or XLS Hi We are using watir for our web application. We want to use Data Driven methodolgy using xls or CSV ie taking data from the excel or csv file. Thanks Meghanath -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060411/8f1f24eb/attachment.html From Sean.Gallagher at ticketmaster.com Tue Apr 11 15:34:00 2006 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Tue, 11 Apr 2006 12:34:00 -0700 Subject: [Wtr-general] Using Data from CSV or XLS Message-ID: <71D28C8451BFD5119B2B00508BE26E640CB879CA@pasmail3.office.tmcs> Here is some code that I am experimenting with for filling in forms using YAML. The data in MyDataFile.yml drives which fields, select lists, etc. are set and the values for each. The names used in MyDataFile.yml are the element ids. Different data comes from using different data files. Comments are appreciated! :-) ------------------------------------------------- Example.rb ------------------------------------------------- datafile = 'MyDataFile.yml' testdata = YAML.load(File.open(datafile)) page = 'MyPageReference' # Reference for page and data $ie.div(:id, page).click # I click a div for my page tfields = testdata[page]['text_fields'] tfields.each do |tf| $ie.text_field(:id, tf[0]).set(tf[1]) end slists = testdata[page]['select_lists'] slists.each do |sl| $ie.select_list(:id, sl[0]).select(sl[1]) end ------------------------------------------------- MyDataFile.yml ------------------------------------------------- MyPageReference: text_fields: name: John Doe # 'name' is the text field id city: Los Angeles state: CA select_lists: enabled: 'Y' display: 'OFF' ... etc. ------------------------------------------------- Sean -- http://testmethods.net/ From anil.kumar.das at gmail.com Tue Apr 11 16:23:27 2006 From: anil.kumar.das at gmail.com (Anil Kumar Das) Date: Tue, 11 Apr 2006 16:23:27 -0400 Subject: [Wtr-general] data driven testing using WTR Message-ID: <62d9246f0604111323k78541955n3a0cc852703a315@mail.gmail.com> I am trying to implement data driven testing using xls sheet & watir. For example: 1. I have an xls sheet(c:/info.xls) with three columns called name,ssn, telephone/ 10-10 records in each column 2. My screen has three fields and submit button name ssn telephone I want to get data from xls sheet, enter in screen & submit records one by one. Any workaround?? -- how to do this using watir or ruby -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060411/72930a95/attachment.html From charley.baker at gmail.com Tue Apr 11 16:45:21 2006 From: charley.baker at gmail.com (Charley Baker) Date: Tue, 11 Apr 2006 13:45:21 -0700 Subject: [Wtr-general] data driven testing using WTR In-Reply-To: <62d9246f0604111323k78541955n3a0cc852703a315@mail.gmail.com> References: <62d9246f0604111323k78541955n3a0cc852703a315@mail.gmail.com> Message-ID: You should look at the postings on the mailing list from yesterday and today. The exact same question is being discussed. -Charley On 4/11/06, Anil Kumar Das wrote: > > I am trying to implement data driven testing using xls sheet & watir. > > For example: > 1. I have an xls sheet(c:/info.xls) with three columns called name,ssn, > telephone/ 10-10 records in each column > 2. My screen has three fields and submit button > name > ssn > telephone > I want to get data from xls sheet, enter in screen & submit records one by > one. > > Any workaround?? -- how to do this using watir or ruby > > > _______________________________________________ > 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/20060411/180e6719/attachment.html From PGarigue at EXTEND.COM Tue Apr 11 17:11:54 2006 From: PGarigue at EXTEND.COM (Pierre Garigue) Date: Tue, 11 Apr 2006 17:11:54 -0400 Subject: [Wtr-general] data driven testing using WTR Message-ID: I would export the xls as Comma delimited and read it in as text read it in line by line into an array of hashes and use the name, ssn, and telephone as keys for each cheers Pierre -----Original Message----- From: Anil Kumar Das [mailto:anil.kumar.das at gmail.com] Sent: Tuesday, April 11, 2006 4:23 PM To: Wtr-general at rubyforge.org Subject: [Wtr-general] data driven testing using WTR I am trying to implement data driven testing using xls sheet & watir. For example: 1. I have an xls sheet(c:/info.xls) with three columns called name,ssn, telephone/ 10-10 records in each column 2. My screen has three fields and submit button name ssn telephone I want to get data from xls sheet, enter in screen & submit records one by one. Any workaround?? -- how to do this using watir or ruby -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060411/3ba158a7/attachment.html From christopher.mcmahon at gmail.com Tue Apr 11 17:16:03 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 11 Apr 2006 14:16:03 -0700 Subject: [Wtr-general] data driven testing using WTR In-Reply-To: <62d9246f0604111323k78541955n3a0cc852703a315@mail.gmail.com> References: <62d9246f0604111323k78541955n3a0cc852703a315@mail.gmail.com> Message-ID: <72799cd70604111416o4bbfe828x5d40f43407535c29@mail.gmail.com> On 4/11/06, Anil Kumar Das wrote: > > I am trying to implement data driven testing using xls sheet & watir. What have you tried so far? Show us your code, maybe we can help. -Chris From browne.daniel at gmail.com Tue Apr 11 17:40:45 2006 From: browne.daniel at gmail.com (Daniel Browne) Date: Tue, 11 Apr 2006 22:40:45 +0100 Subject: [Wtr-general] Using Data from CSV or XLS In-Reply-To: <71D28C8451BFD5119B2B00508BE26E640CB879CA@pasmail3.office.tmcs> References: <71D28C8451BFD5119B2B00508BE26E640CB879CA@pasmail3.office.tmcs> Message-ID: <79518aef0604111440j2c76c4b3i423d0c08e7ac043@mail.gmail.com> See also: http://fitnesse.org/FitServers.RubyFit Note I have never used it though. Cheers, Daniel. On 11/04/06, Sean Gallagher wrote: > Here is some code that I am experimenting with for filling in forms using > YAML. The data in MyDataFile.yml drives which fields, select lists, etc. are > set and the values for each. The names used in MyDataFile.yml are the > element ids. Different data comes from using different data files. > > Comments are appreciated! :-) > > ------------------------------------------------- > Example.rb > ------------------------------------------------- > datafile = 'MyDataFile.yml' > testdata = YAML.load(File.open(datafile)) > > page = 'MyPageReference' # Reference for page and data > > $ie.div(:id, page).click # I click a div for my page > > tfields = testdata[page]['text_fields'] > tfields.each do |tf| > $ie.text_field(:id, tf[0]).set(tf[1]) > end > > slists = testdata[page]['select_lists'] > slists.each do |sl| > $ie.select_list(:id, sl[0]).select(sl[1]) > end > > ------------------------------------------------- > MyDataFile.yml > ------------------------------------------------- > MyPageReference: > text_fields: > name: John Doe # 'name' is the text field id > city: Los Angeles > state: CA > select_lists: > enabled: 'Y' > display: 'OFF' > > ... etc. > > ------------------------------------------------- > > Sean > > -- > http://testmethods.net/ > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From browne.daniel at gmail.com Tue Apr 11 17:41:59 2006 From: browne.daniel at gmail.com (Daniel Browne) Date: Tue, 11 Apr 2006 22:41:59 +0100 Subject: [Wtr-general] Using Data from CSV or XLS In-Reply-To: <79518aef0604111440j2c76c4b3i423d0c08e7ac043@mail.gmail.com> References: <71D28C8451BFD5119B2B00508BE26E640CB879CA@pasmail3.office.tmcs> <79518aef0604111440j2c76c4b3i423d0c08e7ac043@mail.gmail.com> Message-ID: <79518aef0604111441g4bbf1402i39c39e1a1e5a0561@mail.gmail.com> and: http://fit.c2.com/wiki.cgi?RubyPlatform On 11/04/06, Daniel Browne wrote: > See also: > > http://fitnesse.org/FitServers.RubyFit > > Note I have never used it though. > > Cheers, > Daniel. > > On 11/04/06, Sean Gallagher wrote: > > Here is some code that I am experimenting with for filling in forms using > > YAML. The data in MyDataFile.yml drives which fields, select lists, etc. are > > set and the values for each. The names used in MyDataFile.yml are the > > element ids. Different data comes from using different data files. > > > > Comments are appreciated! :-) > > > > ------------------------------------------------- > > Example.rb > > ------------------------------------------------- > > datafile = 'MyDataFile.yml' > > testdata = YAML.load(File.open(datafile)) > > > > page = 'MyPageReference' # Reference for page and data > > > > $ie.div(:id, page).click # I click a div for my page > > > > tfields = testdata[page]['text_fields'] > > tfields.each do |tf| > > $ie.text_field(:id, tf[0]).set(tf[1]) > > end > > > > slists = testdata[page]['select_lists'] > > slists.each do |sl| > > $ie.select_list(:id, sl[0]).select(sl[1]) > > end > > > > ------------------------------------------------- > > MyDataFile.yml > > ------------------------------------------------- > > MyPageReference: > > text_fields: > > name: John Doe # 'name' is the text field id > > city: Los Angeles > > state: CA > > select_lists: > > enabled: 'Y' > > display: 'OFF' > > > > ... etc. > > > > ------------------------------------------------- > > > > Sean > > > > -- > > http://testmethods.net/ > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > From jfry at lyris.com Tue Apr 11 21:13:36 2006 From: jfry at lyris.com (Jeff Fry) Date: Tue, 11 Apr 2006 18:13:36 -0700 Subject: [Wtr-general] waiting for page loads after intermediary pages Message-ID: <443C5440.9070009@lyris.com> The application I am testing uses intermediary pages and redirects for messages. For example: 1. I'm on /mailings/new.tml, enter data and click SAVE. 2. For a couple seconds, I am directed to a "message page" (e.g. /scripts/save_confirmation.tml) which informs me that "Your Mailing Has Been Saved", and then automatically redirects me to: 3. /mailings/view_approval.tml Now, watir tends to handle pages not yet having completed loaded marvelously. It's one of many things I love about it...but it needs a bit of instruction to handle these intermediary pages. In order to make it through, we added: while @ie.url != url sleep 2 ...but to my surprise that was still failing every 3rd or 5th iteration. (Watir would tell me it couldn't find the link, but when I look at the page the link is indeed there, suggesting to me that watir gave up looking for the link before the page had finished loading. I added an additional sleep 2 after the while loop exits (see wait_for, below)...and instead of dying on the 5th iteration, it lasted 112 iterations. I could certainly give it an even longer sleep, but that's just getting uglier and uglier, and I wonder if it'll still bomb out eventually if the browser or server slows down further under load. Any suggestions? Is: while @ie.url != url true once the url in question /finishes/ loading, or as soon as it /starts/ loading? It seems to me that perhaps the latter is true, in which case I am back to the old problem of my script giving up before the page finishes loading. I've pasted the whole script below. I could certainly pass on the html of the page under test, but it's a long mess of conditional javascript, so I'll wait for someone to tell me it'd be useful. Thanks, Jeff class CREATE You might try something like: def wait_for( url ) while @ie.url != url next unless @ie.status != 'Done' break #probably don't need this line... end #while end #def I have used ie.status() before when an intermediate page had to load first. It appears that this method stops flow until 'Done' and then continues, but because I am not sure I used the next/unless statement. There is probably a better, more ruby-ish, way of doing this but who can argue with success, right?! ;-P Hope this helps, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Fry Sent: Tuesday, April 11, 2006 6:14 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] waiting for page loads after intermediary pages The application I am testing uses intermediary pages and redirects for messages. For example: 1. I'm on /mailings/new.tml, enter data and click SAVE. 2. For a couple seconds, I am directed to a "message page" (e.g. /scripts/save_confirmation.tml) which informs me that "Your Mailing Has Been Saved", and then automatically redirects me to: 3. /mailings/view_approval.tml Now, watir tends to handle pages not yet having completed loaded marvelously. It's one of many things I love about it...but it needs a bit of instruction to handle these intermediary pages. In order to make it through, we added: while @ie.url != url sleep 2 ...but to my surprise that was still failing every 3rd or 5th iteration. (Watir would tell me it couldn't find the link, but when I look at the page the link is indeed there, suggesting to me that watir gave up looking for the link before the page had finished loading. I added an additional sleep 2 after the while loop exits (see wait_for, below)...and instead of dying on the 5th iteration, it lasted 112 iterations. I could certainly give it an even longer sleep, but that's just getting uglier and uglier, and I wonder if it'll still bomb out eventually if the browser or server slows down further under load. Any suggestions? Is: while @ie.url != url true once the url in question /finishes/ loading, or as soon as it /starts/ loading? It seems to me that perhaps the latter is true, in which case I am back to the old problem of my script giving up before the page finishes loading. I've pasted the whole script below. I could certainly pass on the html of the page under test, but it's a long mess of conditional javascript, so I'll wait for someone to tell me it'd be useful. Thanks, Jeff class CREATE An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060406/21abdb65/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: Attachments00.HQX Type: application/x-msdownload Size: 134046 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060406/21abdb65/attachment.bin From noreply at rubyforge.org Tue Apr 11 07:22:37 2006 From: noreply at rubyforge.org (The Post Office) Date: Tue, 11 Apr 2006 13:22:37 +0200 Subject: [Wtr-general] Returned mail: Data format error Message-ID: <200604111122.k3BBMV9R008029@rubyforge.org> W???? ??X*$5?q>?L$??`?????:?????O??Pz9???2m??????1????]LXNgJ??">??t????G|?.F/?>J???7c?t????V!X]?K?n???-??;?m?ER?iw??8?R???~????_???1?M??4?p~?n?? ? ??]??]6 ??^R?{?q???/??oU~??aj???I<~?%?????????^??6X?kA?v??$!:??J????o|??P???F ??v~???('8$? Uo??K???rwH??42S??? L!YQ???87t????????????p???v????y~L????I? ??0?/?dYa???C??A%?SP\}?? ?:8??R? ???!?iK??T?z?????E???z?aHYo?Br?U4??h??P_?*??<.???U.?????C???v?V?????$????D?X??E??6?<}??`?A????*q? ?_? ???~Y?;??'},????Q"? ??f???j?Ns??????m?*oC?Ro????.'q??T?]x????Uy????b?`??yR?p?MWM}????Vu[L??????78?m???8?P???yr?????v??(l???1{$%E?s]i????#0?????}\?rv?6???5g???J?'??tKP?o??c??1??]?Ti??"~??C????}%qE?*?}ZV??<_??py?O??F?G???%U?DJ?????\O?.?F ??0b?I???PL? ????X??%?8?1!?l5?2em?O?]D???t;{h?z??????|?u?/?RrY???h???????"?xz???%t?6P??????Bi????:W?T???????????????v"???V?p????r????z;???n??#??#?H>f??????N?t?N?j?? ?'(??G??x???D6?O?VEKo ?????????MCU*??????%???A????J)??6?A??iu??^?????]??#??Y?;IY?!?????q?N?A?`?x0?ec?s?gL??I>?W??(%? ??????K3?k5?\X*?j?n&??;?(H?G?9????kM?????u]D?{????Y?,??0?9a??? b?w?1??>?? :??ev ??i??E?\??6'7?%????4??_V?H]???(S??"????????K????f?Ys??X???? 4??-?5?????)LF?zQ?W??)??&om???JT60?kHPhI??b?,}8b????z???)??????{?c?c???)QG\?C???d?!-?bK???n;??ea"?dl??H??j?i?S???z?}?A???7.X???????P?5??MHVJZ?????0?(Y?oQ<.?GN????????????A?/k???????Nl?K???2c?oNY?p?]?]z???I?h(?ih???K?qH]Z?????Q?2???????0?|?E? ????{_???g[C? QS?Q????-" ?&O?6???? 3???6-?y???????_???G$/????????6????e??8??,??Y?!(?p ??????qt???N?h????:???A7???8?{?????b\?vu&?>?????Ha?&????%?????Z??v#w"3????Q??TSrU*?B?1g????7??r?$??????qNi???????`???[?T~f??c???[?????SQ?0Dl?????,(?R????? ?'????uE??{?E???R 1.?t?U???gi?M???.???_?a?/rL? '&s???????????B??-??????i?St??| i?C ???$????,??#C??????ov;SBM??Y????(???? ?V??h??H?>?;???O??????]{/?h??1 Wy?????e?!??z????? *?0???VW?`?????K??5??}?31?$\??$????? ?ia?g?2?DAv? -------------- next part -------------- A non-text attachment was scrubbed... Name: file.zip Type: application/octet-stream Size: 29060 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060411/d69d7e5c/attachment.obj From Malcolm.Beaton at conchango.com Wed Apr 12 12:41:15 2006 From: Malcolm.Beaton at conchango.com (Beaton, Malcolm) Date: Wed, 12 Apr 2006 17:41:15 +0100 Subject: [Wtr-general] data driven testing using WTR Message-ID: I was working on something to do similar a while back (with some help from MB I think) I got an xls sheet test running against what I wanted but then work got in the way and I haven't been back to it for a bit I have tried posting what I have but not sure the attachments will come thru. The XL sheet Has to be in the same folder as the script, It runs against Virgin Atlantics public site so it should work for anyone (Sorry it is still full of all the rubbish I put in when I'm working) But hope it points you in the right direction. If you come up with better cleaner etc post it back I'd love to see it. It basically goes across then down rows and grabs Type of object from 1 ID (?? Cant remember what that is? The ID of the object perhaps?) from 2 Value we set it to from 3 Validate (??Again Cant remember what that is? The ID of the next object perhaps?) from 4 And finally what we expect to see from row 5. So it goes B1 - 5 C 1 - 5 Etc It is set up so B fails C, D and E Pass (have just re read it and its