From forum-watir-users at openqa.org Fri Jun 1 02:03:32 2007 From: forum-watir-users at openqa.org (Harmeet) Date: Fri, 01 Jun 2007 01:03:32 CDT Subject: [Wtr-general] Clicking link in Ajax table Message-ID: <32889383.18471180677842971.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> *How to click a dynamic link in AJAX table that changes its state from 'Save PDS' to 'Saved' and also sends a request to the server to save a fund with APIR code. I am using Watir. Here is the code* From zeljko.filipin at gmail.com Fri Jun 1 04:49:19 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 1 Jun 2007 10:49:19 +0200 Subject: [Wtr-general] how to count the no of link in a datatable In-Reply-To: <41096639.11311180616457596.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <7523f5800705310110n7988a1a7radccf17bcbbede01@mail.gmail.com> <41096639.11311180616457596.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 5/31/07, Ravi wrote: > > ie.table(:index,1).links.length I knew that there must be a simpler solution. :) Thanks Ravi. Zeljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070601/454ded97/attachment.html From zeljko.filipin at gmail.com Fri Jun 1 05:38:20 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 1 Jun 2007 11:38:20 +0200 Subject: [Wtr-general] Clicking link in Ajax table In-Reply-To: <32889383.18471180677842971.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <32889383.18471180677842971.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: This does not work? ie.link(:text, "Save PDS").click Zeljko -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070601/a2a33067/attachment.html From watir_user at yahoo.co.in Fri Jun 1 10:04:31 2007 From: watir_user at yahoo.co.in (watir-user watir-user) Date: Fri, 1 Jun 2007 15:04:31 +0100 (BST) Subject: [Wtr-general] How do i check the sorting of Date? Message-ID: <206419.20231.qm@web94313.mail.in2.yahoo.com> Hi All, I need help for checking the sorting date. I have a link called Job Date below of this link displays list of Date, clicking on this link it sorts the date field, like follow 05/31/2007 09:36 AM 05/31/2007 09:36 AM 05/31/2007 09:13 AM 05/30/2007 03:20 PM 05/30/2007 11:16 AM 05/30/2007 09:52 AM 05/30/2007 09:49 AM 05/29/2007 12:59 PM 05/29/2007 10:45 AM How do i confirm that clicking on Job Date link, it displays all the dates in proper sorting order? Looking forward, --------------------------------- Looking for people who are YOUR TYPE? Find them here! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070601/a78be254/attachment.html From paul.rogers at shaw.ca Fri Jun 1 10:55:30 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 01 Jun 2007 08:55:30 -0600 Subject: [Wtr-general] How do i check the sorting of Date? References: <206419.20231.qm@web94313.mail.in2.yahoo.com> Message-ID: <011401c7a45c$e5d7f370$6400a8c0@laptop> there is a parse method on the Date class which allows you to create a ruby date object from a string http://www.ruby-doc.org/core/classes/Date.html#M000656 you could do this for each of the dates listed below, and then have ruby sort them, and format in the same style as they are shown in below, then you can do a string compare. Paul ----- Original Message ----- From: watir-user watir-user To: wtr-general at rubyforge.org Sent: Friday, June 01, 2007 8:04 AM Subject: [Wtr-general] How do i check the sorting of Date? Hi All, I need help for checking the sorting date. I have a link called Job Date below of this link displays list of Date, clicking on this link it sorts the date field, like follow 05/31/2007 09:36 AM 05/31/2007 09:36 AM 05/31/2007 09:13 AM 05/30/2007 03:20 PM 05/30/2007 11:16 AM 05/30/2007 09:52 AM 05/30/2007 09:49 AM 05/29/2007 12:59 PM 05/29/2007 10:45 AM How do i confirm that clicking on Job Date link, it displays all the dates in proper sorting order? Looking forward, ------------------------------------------------------------------------------ Looking for people who are YOUR TYPE? Find them here! ------------------------------------------------------------------------------ _______________________________________________ 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/20070601/29bb5ac3/attachment.html From bret at pettichord.com Fri Jun 1 11:18:01 2007 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 01 Jun 2007 10:18:01 -0500 Subject: [Wtr-general] Microsoft Support for Ruby In-Reply-To: <465E408E.3030304@pettichord.com> References: <465E408E.3030304@pettichord.com> Message-ID: <466038A9.5010401@pettichord.com> Bret Pettichord wrote: > Some of you may have seen some of the recent announcements from > Microsoft regarding their plans to support Ruby in the .Net environment. > This is an excellent post that analyzes the impact that this may have: > http://martinfowler.com/bliki/RubyMicrosoft.html > Here is a response from Microsoft's lead Ruby developer. http://www.iunknown.com/2007/05/microsoft_and_i.html From bret at pettichord.com Fri Jun 1 14:55:37 2007 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 01 Jun 2007 13:55:37 -0500 Subject: [Wtr-general] Fox Test Runner Message-ID: <46606BA9.9020900@pettichord.com> Have any of you gotten the Fox Test Runner to work? This is used if you run your Test::Unit based tests using the "-rf" command line switch. I have installed fxruby-1.6.11.gem and RXRuby-1.6.11-ruby186.exe, but still get this error: no such file to load -- fox (LoadError) I'm guessing that this is a version problem with Fox. Wdyt? Bret From phlip2005 at gmail.com Fri Jun 1 15:19:22 2007 From: phlip2005 at gmail.com (Phlip) Date: Fri, 1 Jun 2007 12:19:22 -0700 Subject: [Wtr-general] Microsoft Support for Ruby In-Reply-To: <466038A9.5010401@pettichord.com> References: <465E408E.3030304@pettichord.com> <466038A9.5010401@pettichord.com> Message-ID: <860c114f0706011219l31d14ca0tac8d781de4243c7@mail.gmail.com> Bret Pettichord wrote: > Some of you may have seen some of the recent announcements from > Microsoft regarding their plans to support Ruby in the .Net environment. > This is an excellent post that analyzes the impact that this may have: > http://martinfowler.com/bliki/RubyMicrosoft.html > > Here is a response from Microsoft's lead Ruby developer. > > http://www.iunknown.com/2007/05/microsoft_and_i.html MS wants to play with the Big Boys now. -- Phlip http://www.oreilly.com/catalog/9780596510657/ "Test Driven Ajax (on Rails)" assert_xpath, assert_javascript, & assert_ajax From manish at gslab.com Sat Jun 2 00:09:10 2007 From: manish at gslab.com (Manish Sapariya) Date: Sat, 02 Jun 2007 09:39:10 +0530 Subject: [Wtr-general] Gmail Automation: Repeated execution fails to send mails, set values fails In-Reply-To: <39762399.12751180620078781.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <39762399.12751180620078781.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <4660ED66.4010003@gslab.com> devya wrote: > But this case > fails after few iteration with following exception > > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1819:in `method_missing': unknown property or method `readyState' (WIN32OLERuntimeError) > HRESULT error code:0x80070005 > Access is denied. from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1819:in `wait' > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:224:in `wait' > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:2575:in `click' > from try.rb:53:in `SendMailGmail' > from try.rb:70 > from try.rb:69:in `each' > from try.rb:69 > Updating the to the latest gem, watir-1.5.1.1192, fixes this problem. Regards, Manish From manish at gslab.com Sat Jun 2 01:54:11 2007 From: manish at gslab.com (Manish Sapariya) Date: Sat, 02 Jun 2007 11:24:11 +0530 Subject: [Wtr-general] Gmail Automation: Repeated execution fails to send mails, set values fails In-Reply-To: <39762399.12751180620078781.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <39762399.12751180620078781.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <46610603.5080502@gslab.com> devya wrote: > Case 2: Fails to set value for the to,subject and mailbody fields after few iteration. > > login > for 1 to 50 > sendmail > logout > > In this case after sending the first, few mails, it shows the to,subject,mailbody fields. The exists? test passes for these controls. > > However setting the values on these controls does not reflect the > value in ie. Also, flash method does not flash it. When I read the > value from these controls, I can read them. > > One interesting thing that I noted is, if I set > the value in ie directly and then read the control, I dont get > the new value, but what I get is the old value. > > Have I found a bug? Isn't watir refreshing the new DOM tree after > sending the mail? > No, there isn't any bug in watir. However, its typical behavior of gmail. I am not sure why, but this is what I observed after playing with gmail. Every time you compose a mail, gmail puts mail compose control in either of the v1,v2,v3 or v4 frame. I have not been able to figure out exactly when it uses a given frame though. One thing I noticed is that sometimes two frames contain the same controls for compose mail and hence the above mentioned behavior. I modified the SendMailGmail() as follows and it worked for 50 iterations. There are chances that the following code may not work in the case, when exists? check is done on elements which are not displayed. I did not face this problem in first run. However, the question is, is there any way to figure out if the controls are the one which are visible in the ie? Can I use Z-Index attribute? Regards, Manish def SendMailGmail(mailTo, mailSubject, mailBody) puts "In SendMailGmail function" @ie.send_keys("c") while((!@ie.frame(:name, "main").frame(:id, "v1").text_field(:id, "to_compose").exists?) && (!@ie.frame(:name, "main").frame(:id, "v2").text_field(:id, "to_compose").exists?) && (!@ie.frame(:name, "main").frame(:id, "v3").text_field(:id, "to_compose").exists?) && (!@ie.frame(:name, "main").frame(:id, "v4").text_field(:id, "to_compose").exists?) ) p "waiting for compose window to appear" sleep(2) end if ( @ie.frame(:name, "main").frame(:id, "v1").text_field(:id, "to_compose").exists? ) frame="v1" elsif ( @ie.frame(:name, "main").frame(:id, "v2").text_field(:id, "to_compose").exists? ) frame="v2" elsif ( @ie.frame(:name, "main").frame(:id, "v3").text_field(:id, "to_compose").exists? ) frame="v3" else frame = "v4" end puts "chosen frame is #{frame}\n" # sleep(2) #if (@ie.frame(:name, "main").frame(:id, "v2").text_field(:id, "to_compose").exists?()) puts "Mail To Address - #{mailTo}" @ie.frame(:name, "main").frame(:id, frame).text_field(:id, "to_compose").set(mailTo) #end #if (@ie.frame(:name, "main").frame(:id, "v2").text_field(:name, "subject").exists?()) puts "Mail Subject - #{mailSubject}" @ie.frame(:name, "main").frame(:id, frame).text_field(:name, "subject").set(mailSubject) #end #if (@ie.frame(:name, "main").frame(:id, "v2").div(:id, "hc_compose").exists?()) puts "Mail Body - #{mailBody}" @ie.frame(:name, "main").frame(:id, frame).div(:id, "hc_compose").document.innerHTML=mailBody #end @ie.frame(:name, "main").frame(:id, frame).button(:id, "snd").click c @ie.frame(:name, "main").wait() sleep(3) end # end function SendMail From jim_matt at swbell.net Sat Jun 2 18:06:58 2007 From: jim_matt at swbell.net (jim_matt) Date: Sat, 2 Jun 2007 17:06:58 -0500 Subject: [Wtr-general] gem error installing 'builder' References: <0b2e01c799c7$46397220$6401a8c0@Jimsxp> Message-ID: <01f001c7a562$570630b0$6401a8c0@Jimsxp> Since no one seemed to have any ideas on how to fix this for Windows (searching, I did find some suggestions for Unix type systems), I decided I would have to bite the bullit and try different versions of Ruby and Watir. I blindly installed a new version of Ruby and a new version of Watir. I do not like to do this because past experience has taught me that I would be trading one set of problems for another. I am happy to report that does not seem to be the case this time. So far, all my scripts are working without a problem. I installed: Ruby 1.8.6-25 Watir 1.5.1.1192 Note that I did not install or update rubygems. I then installed other gems I needed including "ci_reporter" and "builder". Jim Matthews ----- Original Message ----- From: jim_matt To: wtr-general at rubyforge.org Sent: Friday, May 18, 2007 10:39 PM Subject: [Wtr-general] gem error installing 'builder' I am resending this because I have not seen it show up in email distribution. I sent it earlier in the day than the one titled "ie.maximize does not always work". I did more research after I sent the following message. Most of the solutions seemed to be for unix based systems. The best one I found for windows appeared to involve completely uninstalling gem 0.9.3 and installing gem 0.9.2. The original message I sent follows below. ------------------------------------------------------------------------------------------------------------------------------- I am getting the following error when I try to install 'builder'. Any suggestions? D:\InstalledFiles\builder_2_1_1>gem install builder -l -y D:\InstalledFiles\builder_2_1_1>"D:\ruby\bin\ruby.exe" "D:\ruby\bin\gem" install builder - l -y ERROR: Error installing gem builder[.gem]: install directory # not absolute Obviously the error about the pathname not being absolute is incorrect. I am running Ruby 1.8.2-15 Watir 1.5-1145 as a gem gem 0.9.3 I am trying to set things up so I can get reports with ci_reporter and running specific versions of Ruby and Watir to avoid certain bugs. Jim Matthews ------------------------------------------------------------------------------ _______________________________________________ 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/20070602/a7674e83/attachment-0001.html From jim_matt at swbell.net Sat Jun 2 18:26:48 2007 From: jim_matt at swbell.net (jim_matt) Date: Sat, 2 Jun 2007 17:26:48 -0500 Subject: [Wtr-general] Cannot identify a table "cell" by "class" in FireWatir Message-ID: <01f701c7a565$1c757c50$6401a8c0@Jimsxp> I know this is mainly for Watir, but I thought some of you might be interested in what I found with FireWatir. One of my goals at the place I am currently working is to have a set of scripts that I can run on IE, Firefox, and Safari. I already have a number of scripts working for Watir. I finally was able to get FireWatir working on my system (for those interested, you might want to check out the Google FireWater Group discussion at http://groups.google.com/group/firewatir ). I modified the first script by changing references from Watir to FireWatir. I had anticipated doing this so I changed the $br = Watir::IE.new to $br = FireWatir::Firefox.new and ran the script. After correcting a couple editing errors, the script ran all the way through. I was very happy since the script did a number of operations that were common to other scripts. I decided to try this with a second script. I made the edits and ran the script. This time the script failed because it could not locate a table cell that was identified by class. $br.cell(:class, "x") This works fine in Watir. I went back and looked at the cell and the class is the only thing that uniqely identifies it. I 'll have to figure something else to do. Jim Matthews -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070602/58148b33/attachment.html From aidy.lewis at googlemail.com Sun Jun 3 03:27:32 2007 From: aidy.lewis at googlemail.com (aidy lewis) Date: Sun, 3 Jun 2007 08:27:32 +0100 Subject: [Wtr-general] instantiate a class that inherits from Test::Unit In-Reply-To: <465F2BF3.6030204@pettichord.com> References: <7ac2300c0705300738g660a9241u5be5b618507c351e@mail.gmail.com> <465DCFD1.7070204@pettichord.com> <7ac2300c0705310020m4c450855ubcb1476ce1994e4e@mail.gmail.com> <465F2BF3.6030204@pettichord.com> Message-ID: <7ac2300c0706030027k39ab8bccpcdeca195bf114762@mail.gmail.com> On 31/05/07, Bret Pettichord wrote: > However, i still have no idea what you are trying to do. Why do you want > to instantiate a test case? > Hi Bret, Each page has its own class. So for example the Login Class will hold its own object map and methods relating to that page class Login def initialize(params) self.username.set(params[:username]) self.password.set(params[:password]) end def username;$ie.text_field(:name, 'username');end def password;$ie.text_field(:name, 'password');end def sign_in;$ie.button(:alt, /Log in/);end end Now, I was thinking of having a method that would assert all the page objects. So I was planing to inherit Test::Unit and instantiate the sub-class: login = Login.new login.check_all_page_objects. aidy From paul.rogers at shaw.ca Sun Jun 3 09:12:35 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 03 Jun 2007 07:12:35 -0600 Subject: [Wtr-general] instantiate a class that inherits from Test::Unit References: <7ac2300c0705300738g660a9241u5be5b618507c351e@mail.gmail.com> <465DCFD1.7070204@pettichord.com> <7ac2300c0705310020m4c450855ubcb1476ce1994e4e@mail.gmail.com> <465F2BF3.6030204@pettichord.com> <7ac2300c0706030027k39ab8bccpcdeca195bf114762@mail.gmail.com> Message-ID: <023c01c7a5e0$da559e50$6400a8c0@laptop> why not put your login code into a login class, and have th test class instantiate that class Login def initialize(params) self.username.set(params[:username]) self.password.set(params[:password]) end def username;$ie.text_field(:name, 'username');end def password;$ie.text_field(:name, 'password');end def sign_in;$ie.button(:alt, /Log in/);end end class TestLogin < Test::Unit::Testcase def test_login asert_nothig_raised( 'Login Problem') do l = Login.new( :password=>'secret' , username = 'paul' ) end end end ----- Original Message ----- From: "aidy lewis" To: Sent: Sunday, June 03, 2007 1:27 AM Subject: Re: [Wtr-general] instantiate a class that inherits from Test::Unit > On 31/05/07, Bret Pettichord wrote: >> However, i still have no idea what you are trying to do. Why do you want >> to instantiate a test case? >> > > Hi Bret, > > Each page has its own class. So for example the Login Class will hold > its own object map and methods relating to that page > > > > class Login > > def initialize(params) > self.username.set(params[:username]) > self.password.set(params[:password]) > end > > def username;$ie.text_field(:name, 'username');end > def password;$ie.text_field(:name, 'password');end > def sign_in;$ie.button(:alt, /Log in/);end > > end > > > > Now, I was thinking of having a method that would assert all the page > objects. So I was planing to inherit Test::Unit and instantiate the > sub-class: > > login = Login.new > login.check_all_page_objects. > > aidy > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Sun Jun 3 14:24:19 2007 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 03 Jun 2007 13:24:19 -0500 Subject: [Wtr-general] instantiate a class that inherits from Test::Unit In-Reply-To: <023c01c7a5e0$da559e50$6400a8c0@laptop> References: <7ac2300c0705300738g660a9241u5be5b618507c351e@mail.gmail.com> <465DCFD1.7070204@pettichord.com> <7ac2300c0705310020m4c450855ubcb1476ce1994e4e@mail.gmail.com> <465F2BF3.6030204@pettichord.com> <7ac2300c0706030027k39ab8bccpcdeca195bf114762@mail.gmail.com> <023c01c7a5e0$da559e50$6400a8c0@laptop> Message-ID: <46630753.9070102@pettichord.com> Paul Rogers wrote: > why not put your login code into a login class, and have th test class > instantiate that > + 1 From forum-watir-users at openqa.org Mon Jun 4 00:45:31 2007 From: forum-watir-users at openqa.org (Harmeet) Date: Sun, 03 Jun 2007 23:45:31 CDT Subject: [Wtr-general] Clicking link in Ajax table In-Reply-To: Message-ID: <28416284.131180932361207.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Please check the attached txt file for code. Actually this link is in table that is in DIV tags. I want to click the "Save PDS" link in table index 2 of the attached code. But it is not clicking with simple ie.link(:text, "Save PDS").click I don't know how to put the code here. I have tried it but couldn't From forum-watir-users at openqa.org Mon Jun 4 03:37:56 2007 From: forum-watir-users at openqa.org (devya) Date: Mon, 04 Jun 2007 02:37:56 CDT Subject: [Wtr-general] Clicking link in Ajax table In-Reply-To: <28416284.131180932361207.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <24398142.61180942707805.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Try ie.table(:name, "xyz")[row][column].link(:text, "Save PDS").click Please replace table identifier and row, coulmn numbers in above code line. I could not find the code attachment to your reply, so used some arbitary values ("abc") for table identifier. Regards -Devyani From zeljko.filipin at gmail.com Mon Jun 4 04:36:07 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Mon, 4 Jun 2007 10:36:07 +0200 Subject: [Wtr-general] Clicking link in Ajax table In-Reply-To: <28416284.131180932361207.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <28416284.131180932361207.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Harmeet, Does this work? ie.table(:index, 2).link(:text, "Save PDS").click Do you get an error message after this? ie.link(:text, "Save PDS").click Zeljko -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070604/fbc65a64/attachment.html From forum-watir-users at openqa.org Mon Jun 4 05:18:13 2007 From: forum-watir-users at openqa.org (sapna) Date: Mon, 04 Jun 2007 04:18:13 CDT Subject: [Wtr-general] To view the message send based on ID created. Message-ID: <34778098.681180948723128.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, Need your kind help for the below problem. In the application there's option to send query. After the query is made the same is displayed in different web page as n rows 2 columns in Date and subject fromate. Now I need to select the message under subject column the one I had sent. I saw in the view source there is ID been created for it can I select it based on the id created or is there any othe way of doing this. Give me an idea how to implement in the WATIR script. Regards Sapna From zeljko.filipin at gmail.com Mon Jun 4 05:25:50 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Mon, 4 Jun 2007 11:25:50 +0200 Subject: [Wtr-general] To view the message send based on ID created. In-Reply-To: <34778098.681180948723128.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <34778098.681180948723128.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi Sapna, Can you post relevant html snippet? Zeljko -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070604/64d3c0c6/attachment.html From forum-watir-users at openqa.org Mon Jun 4 06:27:11 2007 From: forum-watir-users at openqa.org (Fletch) Date: Mon, 04 Jun 2007 05:27:11 CDT Subject: [Wtr-general] select_list Message-ID: <32139870.1131180952861833.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi All, Is it possible to select an item in a select list by index? I have a situation whereby either the test does not know, or does not care what it selects from a multiple select list, so each time I run this script I want to just select the first item in the select list. @mainFrame.select_list(:name, 'availableItems').select(:index, 1) does not seem to do the trick. I would use the get all content method, but there is the added complexity that we can select as many items as we want in the list, but the validation will only allow a maximum of three to ever be saved. Any help with this one would be appreciated. Thanks, PMF. From forum-watir-users at openqa.org Mon Jun 4 06:29:14 2007 From: forum-watir-users at openqa.org (sapna) Date: Mon, 04 Jun 2007 05:29:14 CDT Subject: [Wtr-general] To view the message send based on ID created. In-Reply-To: Message-ID: <33940683.1201180952984187.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I don't know if this would help you out in figuring out the my problem. Please let me know. Bill Payment Inquiry From forum-watir-users at openqa.org Mon Jun 4 06:36:31 2007 From: forum-watir-users at openqa.org (Vipul) Date: Mon, 04 Jun 2007 05:36:31 CDT Subject: [Wtr-general] Unable to loc. obj excep. for obj visible through show_all_objects cmd Message-ID: <33738756.1271180953421486.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, on executing following command $ie.frame(:index,2).show_all_objects i get the object image name=WorkOrderSummary1$roundedGroupBox$ibtnNewWorkOrder id=WorkOrderSummary1_roundedGroupBox_ibtnNewWorkOrder value= alt=New WorkOrder src=http://10.2.56.17/MCCLdap/_imgs/newRecord.gif but when i try to click the image $ie.frame(:index,2).image(:alt,/New WorkOrder/i).click i get the exception 'Unable to locate object, using alt and (?i-mx:New WorkOrder)' i have tried using sleep before image click but still getting the same exception. From zeljko.filipin at gmail.com Mon Jun 4 07:02:46 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Mon, 4 Jun 2007 13:02:46 +0200 Subject: [Wtr-general] To view the message send based on ID created. In-Reply-To: <33940683.1201180952984187.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <33940683.1201180952984187.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 6/4/07, sapna wrote: > > href="/AppsUIWeb/SelfService/MessageDetail.aspx?id=1274&messageToUser=False">Bill > Payment Inquiry Sapna, What do you need to do? Click this link? This does not do it? ie.link(:text, "Bill Payment Inquiry").click ie.link(:href, /id=1274/).click Zeljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070604/77e55381/attachment.html From chitta.ranjan at globallogic.com Mon Jun 4 08:28:15 2007 From: chitta.ranjan at globallogic.com (chitta) Date: Mon, 4 Jun 2007 17:58:15 +0530 Subject: [Wtr-general] Read a picture number Message-ID: <000c01c7a6a3$d31187d0$fa64a8c0@synapse.com> Hi,, Is this possible to read a picture number from a page and write it in the text field. Regards Chitta Ranjan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070604/39ced42f/attachment.html From prema.arya at gmail.com Mon Jun 4 10:17:56 2007 From: prema.arya at gmail.com (Prema Arya) Date: Mon, 4 Jun 2007 19:47:56 +0530 Subject: [Wtr-general] Read a picture number In-Reply-To: <000c01c7a6a3$d31187d0$fa64a8c0@synapse.com> References: <000c01c7a6a3$d31187d0$fa64a8c0@synapse.com> Message-ID: <27915010706040717u1dac700en3ca0af93a52c59f0@mail.gmail.com> Hi, You want to read the number from an image or text in the html code? give us a clear picture. Regards, Perma On 6/4/07, chitta wrote: > > Hi,, > > > Is this possible to read a picture number from a page and write it in the > text field. > > > > Regards > > Chitta Ranjan > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- Prema Arya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070604/d516d402/attachment.html From forum-watir-users at openqa.org Mon Jun 4 10:36:23 2007 From: forum-watir-users at openqa.org (reinier) Date: Mon, 04 Jun 2007 09:36:23 CDT Subject: [Wtr-general] length not recognized for array within a class In-Reply-To: <35533066.6411179134550280.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <33960027.2791180967813802.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> thanks, that was the solution From forum-watir-users at openqa.org Mon Jun 4 10:38:14 2007 From: forum-watir-users at openqa.org (Ravi) Date: Mon, 04 Jun 2007 09:38:14 CDT Subject: [Wtr-general] select_list In-Reply-To: <32139870.1131180952861833.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <30044114.2861180967924914.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> > @mainFrame.select_list(:name, 'availableItems').select(:index, 1) does not seem to do the trick. This should work: @mainFrame.select_list(:name, 'availableItems').getAllContents[0] From bret at pettichord.com Mon Jun 4 15:08:24 2007 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 04 Jun 2007 14:08:24 -0500 Subject: [Wtr-general] Wait issue with file_field.set, solution In-Reply-To: <68f4a0e80703070731j50b7b65dy4f2807b8679d7b78@mail.gmail.com> References: <68f4a0e80703070731j50b7b65dy4f2807b8679d7b78@mail.gmail.com> Message-ID: <46646328.50004@pettichord.com> I'm responding to an old thread -- catching up on my email. In this proposal (from March), Ethan provided a Jira ticket and code patches. http://jira.openqa.org/browse/WTR-146 My understanding is that this proposal can be summarized in two points. 1. Provide the same options to Filefield#set as currently exist for Element#click. 2. Change the API. If this is correct, then i would like to consider the two parts of proposal separately. If not, i would like to know what else is being proposed. Bret Ethan Jewett wrote: > I think that the addition of the "click" to file_field.set in this > change (see thread below) is causing one of my tests to hang during > the @container.wait in the "click" method. However, this problem > didn't show up until after the changes to the wait functionality in > mid-February. Or so my theory goes . . . > > The fix, in my case, is to change the "click" to a "click!" in > file_field.set, by-passing the @container.wait in the click method. I > suppose I could use a time-out technique instead. > > I can't provide a test case, unfortunately, because I don't have a > handle on all the javascript eventing and fancy ajax-y reload in > various frames that's going on in a generated SAP business server > pages app. I think this is a relatively well-known issue with > ajax-like apps. Please correct me if I'm wrong. > > Attached is a patch to the 1.5.1163 revision that illustrates the way > I've modified watir.rb to allow me to specify wait behavior in the > file_field.set method. The "watir 1.5.1163 - no_wait option in > file_field.set.patch" basically throws any extra arguments on > file_field.set into an args_hash Hash. The "set" method then checks > for the :no_wait key and either "click"s or "click!"s based on that > key. > > So, > > file_field.set(path) results in a "click" > file_field.set(path, :no_wait => false) results in a "click" > file_field.set(path, :no_wait => true) results in a "click!" > > The upside here is that this doesn't change existing behavior. The > downside is that it is kind of a hack as it stands. > > I think that implementing this sort of functionality in a more general > (and perhaps better thought-out) way would give a lot of flexibility > to those of us dealing with ajax goodness to manually override wait > functionality when necessary. It might also be a reasonably standard > way to allow granular control of other functionality on a method-call > by method-call basis. > > Is this reasonable? Has something like this been decided against in > the past? Is it too big a change for 1.5? Thoughts on problems? > Improvements? Maybe using :wait => false instead of :no_wait => true > would be more intuitive? > > I don't think this patch is ready to go into the code-base as it > stands, even if people think it is a reasonable approach, but I'll > submit a Jira ticket once I have something that I think will work. > > Thanks, > Ethan > > On 1/10/07, Bret Pettichord wrote: >> John Lolis wrote: >> > I registered AutoItX3.dll using regsvr32 and it got rid of the >> error message, the problem now is it doesn't fill in the field with >> any text. I can flash it, so i know I have the right field - I just >> can't put anything in there. >> > >> > any more ideas? >> > >> >> Today I checked in fixes for both this and the other problem (autoit >> registration). These are NOT in today's dev gem, but will be in the next >> one. You can pull them from trunk if you like. >> >> A workaround for this problem for earlier versions of 1.5 is this: >> >> 1. Manually register autoit: >> >> >regsvr32 AutoItX3.dll >> >> 2. Add a call to click: >> >> ie.file_field(:id, >> 'DriverFileUpload_DriverFileUpload').set(filename) >> ie.file_field(:id, 'DriverFileUpload_DriverFileUpload').click >> >> Please let us know if either of these solutions does not fix this >> problem for anyone. >> >> Bret >> _______________________________________________ >> Wtr-general mailing list >> Wtr-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-general >> > ------------------------------------------------------------------------ > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From forum-watir-users at openqa.org Mon Jun 4 19:04:45 2007 From: forum-watir-users at openqa.org (Harmeet) Date: Mon, 04 Jun 2007 18:04:45 CDT Subject: [Wtr-general] Clicking link in Ajax table In-Reply-To: <24398142.61180942707805.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <29835985.6831180998315366.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> How can I post the HTML code here in this message From chitta.ranjan at globallogic.com Mon Jun 4 23:42:49 2007 From: chitta.ranjan at globallogic.com (chitta) Date: Tue, 5 Jun 2007 09:12:49 +0530 Subject: [Wtr-general] Read a picture number Message-ID: <002001c7a723$96cc3dd0$fa64a8c0@synapse.com> Yap, that's an image,, I am in a process to write a script which automate the total process of email creation in gmail, But during registration you can mark an image always populated which contain some random alphabets, later which user needs to type it by looking at the image,,, & I Baffled their. Thanks in Advance Chitta Ranjan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070605/30136a12/attachment.html From jeff.fry at gmail.com Tue Jun 5 00:41:27 2007 From: jeff.fry at gmail.com (Jeff Fry) Date: Mon, 04 Jun 2007 21:41:27 -0700 Subject: [Wtr-general] Read a picture number In-Reply-To: <002001c7a723$96cc3dd0$fa64a8c0@synapse.com> References: <002001c7a723$96cc3dd0$fa64a8c0@synapse.com> Message-ID: <4664E977.3090502@gmail.com> chitta wrote: > Yap, that's an image,, > > I am in a process to write a script which automate the total process > of email creation in gmail, But during registration you can mark an > image always populated which contain some random alphabets, later > which user needs to type it by looking at the image,,, & I Baffled their. > Hi Chitta, It sounds like you want to automate creating many gmail accounts, and are being prevented by CAPTCHAs ...which they use specifically to prevent folks from automating creating many gmail accounts. Am I understanding you correctly? If I am - No, Watir definitely doesn't have any functionality to get around this...and I think we'd probably resist adding it, unless we understood what good purpose you'd be using it for. (I have no reason to make assumptions about how you would use this, but most people who are interested in cracking CAPTCHAs are spammers.) Jeff ---- http://testingjeff.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070604/b3347d33/attachment-0001.html From chitta.ranjan at globallogic.com Tue Jun 5 01:00:08 2007 From: chitta.ranjan at globallogic.com (chitta) Date: Tue, 5 Jun 2007 10:30:08 +0530 Subject: [Wtr-general] Read a picture number Message-ID: <000301c7a72e$63a65d90$091b10ac@synapse.com> Hi, That was not my intention, I really need more then 50 active email addresses for my testing purpose ,,, ok that's not an issue,, I will make it manually, unless I will try to make some alias mail id. Regards Chitta Ranjan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070605/f5f4ef35/attachment.html From jeff.fry at gmail.com Tue Jun 5 01:12:38 2007 From: jeff.fry at gmail.com (Jeff Fry) Date: Mon, 04 Jun 2007 22:12:38 -0700 Subject: [Wtr-general] Read a picture number In-Reply-To: <000301c7a72e$63a65d90$091b10ac@synapse.com> References: <000301c7a72e$63a65d90$091b10ac@synapse.com> Message-ID: <4664F0C6.2000401@gmail.com> chitta wrote: > > Hi, > > > > That was not my intention, I really need more then 50 active email > addresses for my testing purpose ,,, ok that's not an issue,, I will > make it manually, unless I will try to make some alias mail id. > > > Cool - thanks for the explanation. I would say for 50 addresses you are probably best off doing it manually...or perhaps experimenting with having a few scripts running that get you to the point of the captcha and then pause, waiting for you to take the next step. Cheers, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070604/7924b418/attachment.html From chitta.ranjan at globallogic.com Tue Jun 5 01:44:55 2007 From: chitta.ranjan at globallogic.com (chitta) Date: Tue, 5 Jun 2007 11:14:55 +0530 Subject: [Wtr-general] Read a picture number Message-ID: <000801c7a734$a57e6310$091b10ac@synapse.com> Well ,, Thanks for the advice, I preferred to go manually. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070605/ba4b109a/attachment.html From forum-watir-users at openqa.org Tue Jun 5 02:37:43 2007 From: forum-watir-users at openqa.org (kumari) Date: Tue, 05 Jun 2007 01:37:43 CDT Subject: [Wtr-general] return data from tablecells? In-Reply-To: <7ac2300c0705310752j22de977bqf43e5c3ec38edb86@mail.gmail.com> Message-ID: <34567470.8731181025493511.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> variable = ie.table(index,1).row_values(1) puts variable the above syntax returns the values in the row number '1' similarly we can also get the values of column. To get the particular value in a cell table = ie.table(:index,1) variable = table[1][1].to_s The above variable gives the cell value of rownumber 1 and columnnumber 1 From forum-watir-users at openqa.org Tue Jun 5 02:50:15 2007 From: forum-watir-users at openqa.org (kumari) Date: Tue, 05 Jun 2007 01:50:15 CDT Subject: [Wtr-general] HELP!!!!!!!!! Stuck with a potential bug. In-Reply-To: <33738756.1271180953421486.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <31549171.9101181026245933.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi i think this will work $ie.frame(:index,2).image(:src,/newRecord.gif/).click try this with button also as image.sometimes may not work where button will work $ie.frame(:index,2).button(:alt,/New WorkOrder/).click bye From zeljko.filipin at gmail.com Tue Jun 5 05:41:14 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Tue, 5 Jun 2007 11:41:14 +0200 Subject: [Wtr-general] Clicking link in Ajax table In-Reply-To: <29835985.6831180998315366.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <24398142.61180942707805.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <29835985.6831180998315366.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 6/5/07, Harmeet wrote: > > How can I post the HTML code here in this message Just paste it, it usually works. Zeljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070605/1e265168/attachment.html From forum-watir-users at openqa.org Tue Jun 5 05:56:51 2007 From: forum-watir-users at openqa.org (sapna) Date: Tue, 05 Jun 2007 04:56:51 CDT Subject: [Wtr-general] To view the message send based on ID created. In-Reply-To: Message-ID: <26705696.10481181037441482.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I think this [ie.link(:href, /id=1274/).click] will help me out but I have another question for this as the id created is dynamic it keep changing for every new transaction. So I need to make transaction and navigate to message page click on the Bill Payment Inquiry link based on the current ID created. So how do I fetch the ID. Regards Sapna From zeljko.filipin at gmail.com Tue Jun 5 06:01:36 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Tue, 5 Jun 2007 12:01:36 +0200 Subject: [Wtr-general] Read a picture number In-Reply-To: <000301c7a72e$63a65d90$091b10ac@synapse.com> References: <000301c7a72e$63a65d90$091b10ac@synapse.com> Message-ID: On 6/5/07, chitta wrote: > > I really need more then 50 active email addresses for my testing purpose > I use my gmail account for testing also. You do not need 50 accounts. Gmail allows you to add "+some_text" after you user name and before "@gmail.com". Like this. username+account1 at gmail.com username+account2 at gmail.com Anything sent to username+account1 at gmail.com and username+account2 at gmail.comwill be delivered to inbox of username at gmail.com. Zeljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070605/64c79697/attachment.html From chitta.ranjan at globallogic.com Tue Jun 5 06:58:29 2007 From: chitta.ranjan at globallogic.com (chitta) Date: Tue, 5 Jun 2007 16:28:29 +0530 Subject: [Wtr-general] Read a picture number Message-ID: <000601c7a760$73304230$091b10ac@synapse.com> I use my gmail account for testing also. You do not need 50 accounts. Gmail allows you to add "+some_text" after you user name and before "@gmail.com". Like this. username+account1 at gmail.com username+account2 at gmail.com Anything sent to username+account1 at gmail.com and username+account2 at gmail.comwill be delivered to inbox of username at gmail.com. ---------------------------------------------------------------------------- --------------------------------------------------------------------------- hi, Great idea, It's working. Thank you very much -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070605/c3fcae91/attachment.html From forum-watir-users at openqa.org Tue Jun 5 08:52:51 2007 From: forum-watir-users at openqa.org (Vipul) Date: Tue, 05 Jun 2007 07:52:51 CDT Subject: [Wtr-general] HELP!!!!!!!!! Stuck with a potential bug. In-Reply-To: <31549171.9101181026245933.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <31835173.1231181048001077.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> yes it worked as a button. Although i am surprised why image worked as button. thanks for the help!!!!!!!!!!!!! From forum-watir-users at openqa.org Tue Jun 5 12:36:10 2007 From: forum-watir-users at openqa.org (imran) Date: Tue, 05 Jun 2007 11:36:10 CDT Subject: [Wtr-general] Upgrading the gem for watir 1.5.1.1192 Message-ID: <27641726.3091181061400088.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> A new gem is ready for download, this is the latest pull from Subversion source, tagged at 1.5.1.1192. This gem has a new install process, due to a new dependency on other gems. After download the gem, execute the following commands in the same directory as the gem: > gem install win32-process --include-dependencies > gem install watir I have applied above .. operations as i execute first command where i have extracted the gem. At the command propmt it asks for the selection .. 2 for ruby and 3 for watir. I apply first one. and then second command is executed. But still the code asking me to upgrade to 1.5.1.1100. Current version of Ruby = Ruby184-18 Current Version of Watir = 1.4.1 What should i do now to upgrade my watir to 1.5.1.1192. Thanks. From bret at pettichord.com Tue Jun 5 14:28:26 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 05 Jun 2007 13:28:26 -0500 Subject: [Wtr-general] Upgrading the gem for watir 1.5.1.1192 In-Reply-To: <27641726.3091181061400088.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <27641726.3091181061400088.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <4665AB4A.7030404@pettichord.com> imran wrote: > But still the code asking me to upgrade to 1.5.1.1100. > What message are you seeing? What is the exact language? From bret at pettichord.com Tue Jun 5 14:30:25 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 05 Jun 2007 13:30:25 -0500 Subject: [Wtr-general] gem error installing 'builder' In-Reply-To: <01f001c7a562$570630b0$6401a8c0@Jimsxp> References: <0b2e01c799c7$46397220$6401a8c0@Jimsxp> <01f001c7a562$570630b0$6401a8c0@Jimsxp> Message-ID: <4665ABC1.3050408@pettichord.com> jim_matt wrote: > So far, all my scripts are working without a problem. > Thanks for the report. From forum-watir-users at openqa.org Tue Jun 5 18:39:08 2007 From: forum-watir-users at openqa.org (Lana) Date: Tue, 05 Jun 2007 17:39:08 CDT Subject: [Wtr-general] How would you approach verification of data in *xml* format with Watir? Message-ID: <39432965.5161181083178921.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> How would you approach verification of data in *xml* format with Watir through the browser? data example: _http://www.live365.com/stations/easytempo?site=xml_ is there some XMLParser available? From christopher.mcmahon at gmail.com Tue Jun 5 18:53:02 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 5 Jun 2007 16:53:02 -0600 Subject: [Wtr-general] How would you approach verification of data in *xml* format with Watir? In-Reply-To: <39432965.5161181083178921.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <39432965.5161181083178921.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70706051553h68b383dei6695a47b5b06bae6@mail.gmail.com> On 6/5/07, Lana wrote: > How would you approach verification of data in *xml* format with Watir through the browser? > data example: _http://www.live365.com/stations/easytempo?site=xml_ > is there some XMLParser available? My understanding is that REXML is pretty much the standard. http://www.germane-software.com/software/rexml/ From forum-watir-users at openqa.org Tue Jun 5 21:13:52 2007 From: forum-watir-users at openqa.org (Lana) Date: Tue, 05 Jun 2007 20:13:52 CDT Subject: [Wtr-general] How would you approach verification of data in *xml* format with Watir? In-Reply-To: <72799cd70706051553h68b383dei6695a47b5b06bae6@mail.gmail.com> Message-ID: <33068267.5301181092462054.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank you for right direction, this helped me to get started: ----------------------------------------------------------------------------------------- #includes require 'watir' require "rexml/document" include Watir include REXML doc = Document.new File.new("station.xml") root = doc.root puts root.elements["STATION_BROADCASTER"] ===== result: username ========================================= But I seems can't find how to get actual value of element 'STATION_BROADCASTER', as there is no attribute, any suggestions? this is my xml: username Thank You, Lana From paul.rogers at shaw.ca Tue Jun 5 21:56:31 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 05 Jun 2007 19:56:31 -0600 Subject: [Wtr-general] How would you approach verification of data in *xml* format with Watir? References: <33068267.5301181092462054.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <000b01c7a7dd$e78eb990$6400a8c0@laptop> you may want to look at xml unit - http://xmlunit.sourceforge.net/ ----- Original Message ----- From: "Lana" To: Sent: Tuesday, June 05, 2007 7:13 PM Subject: Re: [Wtr-general] How would you approach verification of data in *xml* format with Watir? > Thank you for right direction, this helped me to get started: > ----------------------------------------------------------------------------------------- > #includes > require 'watir' > require "rexml/document" > include Watir > include REXML > > > doc = Document.new File.new("station.xml") > root = doc.root > puts root.elements["STATION_BROADCASTER"] > ===== > result: > username > ========================================= > But I seems can't find how to get actual value of element > 'STATION_BROADCASTER', as there is no attribute, any suggestions? > > this is my xml: > > username > > Thank You, > Lana > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From christopher.mcmahon at gmail.com Tue Jun 5 23:09:29 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 5 Jun 2007 21:09:29 -0600 Subject: [Wtr-general] How would you approach verification of data in *xml* format with Watir? In-Reply-To: <33068267.5301181092462054.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <72799cd70706051553h68b383dei6695a47b5b06bae6@mail.gmail.com> <33068267.5301181092462054.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70706052009j4ce1c74fr680e85c165a6c124@mail.gmail.com> It's been a while since I've mucked around with REXML, but this works: ##################### require "rexml/document" include REXML xml = REXML::Document.new(" username ") xml.elements.each("*/STATION_BROADCASTER") {|e| puts e.text} ################################## I'll recommend that you read the tutorial over and over. If I'm not mistaken, there's a REXML mail list, or comp.lang.ruby is always a good place to find information from people much more experienced than me. http://www.germane-software.com/software/rexml/docs/tutorial.html On 6/5/07, Lana wrote: > Thank you for right direction, this helped me to get started: > ----------------------------------------------------------------------------------------- > #includes > require 'watir' > require "rexml/document" > include Watir > include REXML > > > doc = Document.new File.new("station.xml") > root = doc.root > puts root.elements["STATION_BROADCASTER"] > ===== > result: > username > ========================================= > But I seems can't find how to get actual value of element 'STATION_BROADCASTER', as there is no attribute, any suggestions? > > this is my xml: > > username > > Thank You, > Lana > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Wed Jun 6 01:38:17 2007 From: forum-watir-users at openqa.org (san) Date: Wed, 06 Jun 2007 00:38:17 CDT Subject: [Wtr-general] How To Check If A Row Inside A Table Exists Or Not & Count Of Rows.... Message-ID: <38583722.6431181108327320.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi Everybody... I Just Tried ie.table(:index, 1).row(:index, 7).exists? or ie.table(:index, 1)[7].exists? But Nothing Works... here's The html 12345
Or Suppose I Have Nested Tables...
Rating History
 
:: Series 1 Graph
 Date  Rating  Action
 10 OCT 2006  Aaa  Change to definitive
 5 SEP 2006  (P)Aaa  New
:: Series 3 Graph
 Date  Rating  Action
 18 MAY 2007  Aaa  Change to definitive
 18 MAY 2007  Aaa  No Rating
 7 MAY 2007  (P)Aaa  New
Now If I Want The Nos Of Rows Of Table with ID Table5 Only What Should I Do, Coz I Just Tried [b]ie.table(:id, "Table5").row_count()[/b] Gives 21 no of Rows, The Total No Of Rows Including The Nested Ones. As Table5 Contains Only 14 Rows Of Itself....Which You Can See By IE Developer Toolbar... Sorry For The Long Html... :) Thanks Everybody... :) From forum-watir-users at openqa.org Wed Jun 6 02:14:21 2007 From: forum-watir-users at openqa.org (kumari) Date: Wed, 06 Jun 2007 01:14:21 CDT Subject: [Wtr-general] How To Check If A Row Inside A Table Exists Or Not & Count Of Rows.... In-Reply-To: <38583722.6431181108327320.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <40363587.6821181110491884.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi If u want only the row count of partiular table without nested ones just use the below function at the starting of script and then use the normal syntax "ie.table(:id, "Table5").row_count()".u will get the row count of particular table ************************************************************************ module Watir include Watir::Exception class Table < Element include Container def row_count assert_exists raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil return @o.rows.length end end end ********************************************************************************** now use "ie.table(:id, "Table5").row_count()".If i am write u have to get the exact row count of table without nested rows. bye Kumari From forum-watir-users at openqa.org Wed Jun 6 02:33:03 2007 From: forum-watir-users at openqa.org (eisdrache) Date: Wed, 06 Jun 2007 01:33:03 CDT Subject: [Wtr-general] Concurrent tests, different regions... Message-ID: <36841192.6891181111613275.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Here is the basic idea of what I am trying to do... I have one site, lets call it www.example.com. On that site, there is a login page which directs to four different regions, say region1.example.com, region2.example.com, etc. Now, on the other side of the equation, watir is being run from a remote webserver. And on that webserver I have a php page which controls the execution of the watir script and then posts the results in a table to the user. So, at the moment, the user goes to the php page. Clicks "start test" and watir then goes to www.example.com and one by one tests each region. However, what I would like is when the user clicks the test button, four separate tests will begin and test each region concurrently. I have tried setting up something like this: php page: $regions = array('region1','region2','region3','region4'); foreach ($regions as $region) { $cmd = "start example.rbw $region"; exec($cmd); sleep(3); } ruby page: region = $ARGV[0] $ie = Watir::IE.start("www.example.com") $ie.text_field(:name, "user").set(username) $ie.text_field(:name, "password").set(password) $ie.select_list(:name, "region").select(region) proceed with testing... This, however, does not seem to work. Seems as if two or three instances will start but only one will actually finish. So, hopefully this makes sense and hopefully someone can help me figure this one out. Thanks in advance. From forum-watir-users at openqa.org Wed Jun 6 03:06:07 2007 From: forum-watir-users at openqa.org (san) Date: Wed, 06 Jun 2007 02:06:07 CDT Subject: [Wtr-general] How To Check If A Row Inside A Table Exists Or Not & Count Of Rows.... In-Reply-To: <40363587.6821181110491884.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <25907479.6961181113597278.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks kumari... It Really Helped Me Out... But I just Copied It.. :P Can You Pls Explain The Function A little Bit More... Thanks A Lot... :) And By The Way Is There Any Way To Check If A Row Inside A Table Exists Or Not... ? From tester.paul at gmail.com Wed Jun 6 09:45:10 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 6 Jun 2007 09:45:10 -0400 Subject: [Wtr-general] Concurrent tests, different regions... In-Reply-To: <36841192.6891181111613275.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <36841192.6891181111613275.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37c405480706060645k6843692fxa365c40cab3bc8ea@mail.gmail.com> Without seeing more of the code, I'm pretty sure you need to start by moving away from using Global variables. On 06/06/07, eisdrache wrote: > > Here is the basic idea of what I am trying to do... > > I have one site, lets call it www.example.com. On that site, there is a > login page which directs to four different regions, say > region1.example.com, region2.example.com, etc. [snip] > I have tried setting up something like this: > > php page: > > $regions = array('region1','region2','region3','region4'); > > foreach ($regions as $region) { > $cmd = "start example.rbw $region"; > exec($cmd); > sleep(3); > } > > ruby page: > > region = $ARGV[0] > > $ie = Watir::IE.start("www.example.com") > > $ie.text_field(:name, "user").set(username) > $ie.text_field(:name, "password").set(password) > $ie.select_list(:name, "region").select(region) > > proceed with testing... > > This, however, does not seem to work. Seems as if two or three instances > will start but only one will actually finish. So, hopefully this makes sense > and hopefully someone can help me figure this one out. > > Thanks in advance. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070606/22607ec0/attachment.html From forum-watir-users at openqa.org Wed Jun 6 10:38:24 2007 From: forum-watir-users at openqa.org (mihai) Date: Wed, 06 Jun 2007 09:38:24 CDT Subject: [Wtr-general] run a javascript in html? Message-ID: <34553573.12721181140734110.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> i have a scientific calculator made in java in a html; how do i test the buttons? when i want to press "5" it runs a javascript function digit(5) how do i call that function in watir? From zeljko.filipin at gmail.com Wed Jun 6 10:42:03 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Wed, 6 Jun 2007 16:42:03 +0200 Subject: [Wtr-general] run a javascript in html? In-Reply-To: <34553573.12721181140734110.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <34553573.12721181140734110.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Some html would help. Zeljko -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070606/ef16089f/attachment.html From forum-watir-users at openqa.org Wed Jun 6 10:48:20 2007 From: forum-watir-users at openqa.org (mihai) Date: Wed, 06 Jun 2007 09:48:20 CDT Subject: [Wtr-general] run a javascript in html? In-Reply-To: <34553573.12721181140734110.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <28085220.12851181141330775.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> this is the page i want to test: [http://www.squarebox.co.uk/scalc.html|http://www.squarebox.co.uk/scalc.html] From forum-watir-users at openqa.org Wed Jun 6 10:52:05 2007 From: forum-watir-users at openqa.org (Titani) Date: Wed, 06 Jun 2007 09:52:05 CDT Subject: [Wtr-general] Watir::Exception::NavigationException not being thrown Message-ID: <29350813.12921181141555133.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I am fairly new to Watir. I had been working with Watir 1.4.1 and I just installed the latest Watir 1.5 gem. When I had Watir 1.4.1 installed, I was able to catch the Watir::Exception::NavigationException when I tried to goto a webpage that did not exist. It seems that 1.5 is not throwing this exception. Does anyone have any suggestions on how I can detect a http error with 1.5. Thanks From paul.rogers at shaw.ca Wed Jun 6 11:33:22 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 06 Jun 2007 09:33:22 -0600 Subject: [Wtr-general] Watir::Exception::NavigationException not being thrown References: <29350813.12921181141555133.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <010001c7a850$04a39d30$6400a8c0@laptop> this was removed from 1.5 because for a few people it was annoying. doing this may fix it require 'watir/contrib/page_checker' ie = Watir::IE.start( 'www.page.com') ie.add_checker(PageCheckers::NAVIGATION_CHECKER) Paul ----- Original Message ----- From: "Titani" To: Sent: Wednesday, June 06, 2007 8:52 AM Subject: [Wtr-general] Watir::Exception::NavigationException not being thrown > Hi, > > I am fairly new to Watir. I had been working with Watir 1.4.1 and I just > installed the latest Watir 1.5 gem. > > When I had Watir 1.4.1 installed, I was able to catch the > Watir::Exception::NavigationException > when I tried to goto a webpage that did not exist. It seems that 1.5 is > not throwing this exception. > > Does anyone have any suggestions on how I can detect a http error with > 1.5. > > Thanks > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Wed Jun 6 13:14:45 2007 From: forum-watir-users at openqa.org (vijay) Date: Wed, 06 Jun 2007 12:14:45 CDT Subject: [Wtr-general] Can an 'excel' file be renamed with a Watir command? Message-ID: <31851105.14701181150115171.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello people, I have got a script that creates an 'excel_file' while running. After running, I want to rename it so that next time, when the script is run, it will create the excel file anew. Can I do that? I tried a few DOS commands but I could find only two DOS commands working in Watir. They are 'Dir.mkdir(directory)' and 'rmdir(directory)' Thanks, in Advance, Vijay From areed at relocationcentral.com Wed Jun 6 13:22:16 2007 From: areed at relocationcentral.com (Adam Reed) Date: Wed, 6 Jun 2007 12:22:16 -0500 Subject: [Wtr-general] Can an 'excel' file be renamed with a Watir command? In-Reply-To: <31851105.14701181150115171.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <31851105.14701181150115171.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36B5DBA88E027F47812ED877C6A978D801372E17@rc-mail.relocationcentral.com> You should be able to use: File.rename("afile", "afile.bak") This is listed in the Pragmatic Programmer's (free) Guide to Ruby: http://www.rubycentral.com/book/ref_c_file.html So you'd just do a little: if File.exists?("test.xls") File.rename("test.xls", "old_test.xls") else... end... Thanks, Adam -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of vijay Sent: Wednesday, June 06, 2007 12:15 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Can an 'excel' file be renamed with a Watir command? Hello people, I have got a script that creates an 'excel_file' while running. After running, I want to rename it so that next time, when the script is run, it will create the excel file anew. Can I do that? I tried a few DOS commands but I could find only two DOS commands working in Watir. They are 'Dir.mkdir(directory)' and 'rmdir(directory)' Thanks, in Advance, Vijay _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Wed Jun 6 14:24:26 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 6 Jun 2007 12:24:26 -0600 Subject: [Wtr-general] Can an 'excel' file be renamed with a Watir command? In-Reply-To: <31851105.14701181150115171.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <31851105.14701181150115171.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70706061124q607144e4x60fca2a9ead45d1b@mail.gmail.com> > I have got a script that creates an 'excel_file' while running. After running, I want to rename it so that next time, when the script is run, it will create the excel file anew. Can I do that? I tried a few DOS commands but I could find only two DOS commands working in Watir. They are 'Dir.mkdir(directory)' and 'rmdir(directory)' That's not DOS and that's not Watir. That's Ruby. You should definitely read up on the Ruby language itself. The only thing Watir knows about is the browser. From forum-watir-users at openqa.org Wed Jun 6 15:10:25 2007 From: forum-watir-users at openqa.org (Lana) Date: Wed, 06 Jun 2007 14:10:25 CDT Subject: [Wtr-general] How would you approach verification of data in *xml* format with Watir? In-Reply-To: <72799cd70706052009j4ce1c74fr680e85c165a6c124@mail.gmail.com> Message-ID: <29362298.15991181157055397.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank You, here is my final basic piece working with your help: ************************************************************** require 'watir' require "rexml/document" include Watir include REXML test_site = 'http://...........site=xml' ie = IE.new ie.goto(test_site) xml_data = Document.new(ie.text) xml_data.elements.each("*/STATION_BROADCASTER") {|e| puts e.text} From christopher.mcmahon at gmail.com Wed Jun 6 15:20:41 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 6 Jun 2007 13:20:41 -0600 Subject: [Wtr-general] How would you approach verification of data in *xml* format with Watir? In-Reply-To: <29362298.15991181157055397.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <72799cd70706052009j4ce1c74fr680e85c165a6c124@mail.gmail.com> <29362298.15991181157055397.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70706061220p6bf557afmce1f26311276c3a4@mail.gmail.com> On 6/6/07, Lana wrote: > Thank You, > here is my final basic piece working with your help: You're welcome, I'm glad you got it to go! From forum-watir-users at openqa.org Wed Jun 6 16:10:35 2007 From: forum-watir-users at openqa.org (vijay) Date: Wed, 06 Jun 2007 15:10:35 CDT Subject: [Wtr-general] Can an 'excel' file be renamed with a Watir command? In-Reply-To: <31851105.14701181150115171.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <39345009.16911181160665970.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank you areed for your answer. That was what I needed. It is working perfectly. Also, cmcmahon, I would definitely try to read the 'Ruby Language Help' file. Thanks, Vijay. From forum-watir-users at openqa.org Wed Jun 6 23:10:18 2007 From: forum-watir-users at openqa.org (Hayato) Date: Wed, 06 Jun 2007 22:10:18 CDT Subject: [Wtr-general] Modal dialog Message-ID: <41417239.19211181185848527.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello, I'm trying to manipulate modal_dialog and I have an issue. In Watir (Ruby) code, I create two threads. One is to load the target page and click on a button. The button in the target page has onclick event handler that executes JavaScript to show modal popup. The other thread in Ruby watches for modal_dialog. The main thread before branching looks like the following. def test $ie = IE.new m = ModalWindowHandler.new modalWindowHandlerThread = Thread.new { m.handleWindow() } l = Thread.new{loadPage()} modalWindowHandlerThread.join l.join end Here is the first thread code. def loadPage() $ie.goto('http://localhost/Default.htm') loadButton = $ie.button(:name, 'btnLoad') loadButton.click end So the first thread loads the modal window, and the other thread watches for it and when it finds it, it clicks on the close button. However, when the first Ruby thread clicks on the button that invokes JavaScript to show modal window, the other thread (modalWindowHandlerThread) also stops. This causes the entire Watir script to halt. But when I manually close the popup window and manually click on the button to show the modal popup window, the other thread restarts and successfully finds the modal window. Does anyone know how to resolve this issue? Please let me know. TIA From manish at gslab.com Thu Jun 7 01:53:36 2007 From: manish at gslab.com (Manish Sapariya) Date: Thu, 07 Jun 2007 11:23:36 +0530 Subject: [Wtr-general] run a javascript in html? In-Reply-To: <28085220.12851181141330775.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <28085220.12851181141330775.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <46679D60.6070008@gslab.com> mihai wrote: > this is the page i want to test: [http://www.squarebox.co.uk/scalc.html|http://www.squarebox.co.uk/scalc.html] > This should work. ie.area(:href, /digit\(4\)/).click For accessing the operators you will have to change the regexp and you are done. Question to the list: On given page, when I do ie.show_links, it shows all the javascript hrefs. However when I do ie.links() or check the existence of these links using ie.link(:href,/digit/) it returns false? Are there any known limitations on accessibility of map and area elements? Thanks and Regards, Manish From forum-watir-users at openqa.org Thu Jun 7 02:17:47 2007 From: forum-watir-users at openqa.org (mihai) Date: Thu, 07 Jun 2007 01:17:47 CDT Subject: [Wtr-general] run a javascript in html? In-Reply-To: <34553573.12721181140734110.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <28334332.20781181197097638.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> nobody can help me? From forum-watir-users at openqa.org Thu Jun 7 02:54:03 2007 From: forum-watir-users at openqa.org (mihai) Date: Thu, 07 Jun 2007 01:54:03 CDT Subject: [Wtr-general] click link in iframe? Message-ID: <30923741.21081181199273196.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> i have this html code: table border="0" cellpadding="0" cellspacing="0" width="100%" > this is a meniu with submenius links: Standard Analytics, Custom Analytics, My Workspace... and can i click Standard Analytics for example in watir? From manish at gslab.com Thu Jun 7 03:10:49 2007 From: manish at gslab.com (Manish Sapariya) Date: Thu, 07 Jun 2007 12:40:49 +0530 Subject: [Wtr-general] run a javascript in html? In-Reply-To: <28334332.20781181197097638.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <28334332.20781181197097638.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <4667AF79.8090103@gslab.com> mihai wrote: > nobody can help me? > Did you try solution posted by me? ----reproduced here--- This should work. ie.area(:href, /digit\(4\)/).click For accessing the operators you will have to change the regexp and you are done. ----------- -Manish From forum-watir-users at openqa.org Thu Jun 7 04:12:26 2007 From: forum-watir-users at openqa.org (jhun) Date: Thu, 07 Jun 2007 03:12:26 CDT Subject: [Wtr-general] [firewatir] Fire_event not working in Firefox Message-ID: <22789869.51181203976545.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I have this in my code: lis = $browser.elements_by_xpath("//li"); lis.each do |li| $logger.log("value: " + li.id); if (li.id == d.id[4..10]) $logger.log("FOUND!!!"); * li.fire_event("ondblclick");* break; end end In bold text, doesnt seem to work. Can you please help me or i hope there's alternative to activate the ondblclick event. Thanks for the help! From forum-watir-users at openqa.org Thu Jun 7 04:56:15 2007 From: forum-watir-users at openqa.org (Manish Sapariya) Date: Thu, 07 Jun 2007 03:56:15 CDT Subject: [Wtr-general] run a javascript in html? In-Reply-To: <28334332.20781181197097638.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <27410012.601181206605767.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> This should work. ie.area(:href, /digit\(4\)/).click For accessing the operators you will have to change the regexp and you are done. From manish at gslab.com Thu Jun 7 04:59:21 2007 From: manish at gslab.com (Manish Sapariya) Date: Thu, 07 Jun 2007 14:29:21 +0530 Subject: [Wtr-general] forum do not get the postings made using the mailing list Message-ID: <4667C8E9.7050003@gslab.com> Hi All, This particular mail is targeted to the admin of watir-general forum on openqa.org. This may be known issue, but I observed that the postings done using mailing list mail id, does not get reflected in the forum and many user's are using just forum for discussing the queries. Is there any way to make sure that the postings do get copied to forum? Thanks and Regards, Manish From forum-watir-users at openqa.org Thu Jun 7 05:00:34 2007 From: forum-watir-users at openqa.org (John) Date: Thu, 07 Jun 2007 04:00:34 CDT Subject: [Wtr-general] Link description from file Message-ID: <26550969.661181206864161.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I have stored the link descriptions in a file to limit the maintenance efforts. I read the description from the file, store it in a variable and then click the link. When I use the whole link description, everything works fine: [code] link = "www.example.com/contact.php" ie.link(:url, link).click [/code] But when I use a regular expression, then it doesn't work, because I think it is stored as a string: [code] link = "/contact/" ie.link(:url, link).click [/code] How can I use regular expressions this way? Is there some string to regular expression conversion possibility? Regards, John Message was edited by: jarkelen1 From xingyuhui at gmail.com Thu Jun 7 05:23:07 2007 From: xingyuhui at gmail.com (=?GB2312?B?u9Q=?=) Date: Thu, 7 Jun 2007 17:23:07 +0800 Subject: [Wtr-general] Link description from file In-Reply-To: <26550969.661181206864161.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <26550969.661181206864161.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <59e2d0a70706070223n6b9a19cfk3c4d9595ca4f6983@mail.gmail.com> hi try this : link = "contact" ie.link(:url, /#{link}/).click 2007/6/7, John : > > Hi, > > I have stored the link descriptions in a file to limit the maintenance > efforts. I read the description from the file, store it in a variable and > then click the link. When I use the whole link description, everything works > fine: > > [code] > link = "www.example.com/contact.php" > ie.link(:url, link).click > [/code] > > But when I use a regular expression, then it doesn't work, because I think > it is stored as a string: > > [code] > link = "/contact/" > ie.link(:url, link).click > [/code] > > How can I use regular expressions this way? Is there some string to > regular expression conversion possibility? > > Regards, > John > > Message was edited by: jarkelen1 > _______________________________________________ > 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/20070607/b2480d48/attachment.html From forum-watir-users at openqa.org Thu Jun 7 05:42:59 2007 From: forum-watir-users at openqa.org (mihai) Date: Thu, 07 Jun 2007 04:42:59 CDT Subject: [Wtr-general] run a javascript in html? In-Reply-To: <34553573.12721181140734110.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <27103407.901181209409922.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> that doesn't work Error: undefined method `area' for # (NoMethodError) watir code: require 'watir' #includes include Watir ie = IE.new ie.goto( 'http://www.squarebox.co.uk/scalc.html' ) sleep(5) ie.area(:href, /digit\(4\)/).click From forum-watir-users at openqa.org Thu Jun 7 05:50:17 2007 From: forum-watir-users at openqa.org (Manish Sapariya) Date: Thu, 07 Jun 2007 04:50:17 CDT Subject: [Wtr-general] run a javascript in html? In-Reply-To: <27103407.901181209409922.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <24949378.961181209847109.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I think watir 1.4 does not support map and area element. Try watir 1.5. From prema.arya at gmail.com Thu Jun 7 05:54:17 2007 From: prema.arya at gmail.com (Prema Arya) Date: Thu, 7 Jun 2007 15:24:17 +0530 Subject: [Wtr-general] [firewatir] Fire_event not working in Firefox In-Reply-To: <22789869.51181203976545.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <22789869.51181203976545.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <27915010706070254k4a7a9dd8j379a678c0c1963b@mail.gmail.com> Hi Jhun, Thanks for reporting this. You can use the latest code form svn/trunk at http://firewatir.googlecode.com/svn/trunk/FireWatir/ We have already fixed this issue. In case you face any problem let me know. Regards, Prema On 6/7/07, jhun wrote: > > I have this in my code: > > lis = > $browser.elements_by_xpath("//li"); > lis.each do |li| > $logger.log("value: " + > li.id); > if (li.id == d.id[4..10]) > $logger.log("FOUND!!!"); > > * li.fire_event > ("ondblclick");* > break; > end > end > > In bold text, doesnt seem to work. Can you please help me or i hope > there's alternative to activate the ondblclick event. Thanks for the help! > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- Prema Arya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070607/3d0763c0/attachment-0001.html From forum-watir-users at openqa.org Thu Jun 7 06:57:25 2007 From: forum-watir-users at openqa.org (jhun) Date: Thu, 07 Jun 2007 05:57:25 CDT Subject: [Wtr-general] [firewatir] Fire_event not working in Firefox In-Reply-To: <22789869.51181203976545.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <24985303.1851181213876217.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> i hope u could help me. Im in a rush. Thanks!!! From forum-watir-users at openqa.org Thu Jun 7 08:04:51 2007 From: forum-watir-users at openqa.org (reinier) Date: Thu, 07 Jun 2007 07:04:51 CDT Subject: [Wtr-general] odd thing on comparing strings Message-ID: <25468925.2911181217921936.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Something odd here, or something foolish I simply miss;) [CODE] strTemp=browser.getEditbox(guiMap.getWindow('login').getObject('Login Editbox','','').getFysicalDescription()) strTemp2='email at address.com' if (strTemp.eql?(strTemp2)) puts('strings match') else puts('string does not match') end if (browser.getEditbox(guiMap.getWindow('login').getObject('Login Editbox','','').getFysicalDescription().eql?('email at address.com'))) puts('TESTCHECK: PASS correct value found in editbox') else puts('TESTCHECK: FAIL incorrect value found in editbox') end [/CODE] The first if statement returns strings match. which is correct, as they indeed do match. However the 2nd if statement returns the following error: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1104:in `locate_input_element': undefined method `m atches' for false:FalseClass (NoMethodError) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1091:in `each' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1091:in `locate_input_element' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:3717:in `locate' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:2412:in `assert_exists' from (eval):2:in `getContents' from ./Classes/CLBrowser.class.rb:338:in `getEditbox' The odd thing about it, is that ther same values are compared with eachother. Any ideas? From bret at pettichord.com Thu Jun 7 12:42:09 2007 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 07 Jun 2007 11:42:09 -0500 Subject: [Wtr-general] forum do not get the postings made using the mailing list In-Reply-To: <4667C8E9.7050003@gslab.com> References: <4667C8E9.7050003@gslab.com> Message-ID: <46683561.5010608@pettichord.com> Manish Sapariya wrote: > This particular mail is targeted to the admin of watir-general > forum on openqa.org. This may be known issue, but I observed that the > postings > done using mailing list mail id, does not get reflected in the > forum and many user's are using just forum for discussing the > queries. > > Is there any way to make sure that the postings do get copied > to forum? > Thanks for the report. The admin of the openqa forums is Patrick Lightbody and he does not read this list. He can be contacted at plightbo at gmail.com. Because of the increased traffic on this list and the ongoing troubles we have had keeping the forums and mailing list synchronized, I have been considering migrating watir-general to google groups. I would like to hear comments on this idea, as well as other suggestions. Bret From christopher.mcmahon at gmail.com Thu Jun 7 13:18:42 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 7 Jun 2007 11:18:42 -0600 Subject: [Wtr-general] forum do not get the postings made using the mailing list In-Reply-To: <46683561.5010608@pettichord.com> References: <4667C8E9.7050003@gslab.com> <46683561.5010608@pettichord.com> Message-ID: <72799cd70706071018y5607e3d6g6c96d9bcca298351@mail.gmail.com> > Because of the increased traffic on this list and the ongoing troubles > we have had keeping the forums and mailing list synchronized, I have > been considering migrating watir-general to google groups. I would like > to hear comments on this idea, as well as other suggestions. +1 Now that I'm subscribed to selenium and selenium-rc groups also, I'm really missing the yahoo/google config options that openqa doesn't have. From bret at pettichord.com Thu Jun 7 14:29:30 2007 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 07 Jun 2007 13:29:30 -0500 Subject: [Wtr-general] Modal dialog In-Reply-To: <41417239.19211181185848527.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <41417239.19211181185848527.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <46684E8A.2050402@pettichord.com> Hayato wrote: > Does anyone know how to resolve this issue? Please let me know. > Don't use threads. Blocking COM calls will block ALL ruby threads. You'll have to spawn code to run in a separate process instead. Bret From hiriumi at gmail.com Thu Jun 7 16:35:17 2007 From: hiriumi at gmail.com (Hayato Iriumi) Date: Thu, 7 Jun 2007 13:35:17 -0700 Subject: [Wtr-general] Modal dialog In-Reply-To: <46684E8A.2050402@pettichord.com> References: <41417239.19211181185848527.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <46684E8A.2050402@pettichord.com> Message-ID: <50c958a0706071335u630ef930ua9ed1c28afcf9b25@mail.gmail.com> Yeah, that's what I was thinking of in my dream. LOL Thanks for your advice, Bret. :-) On 6/7/07, Bret Pettichord wrote: > Hayato wrote: > > Does anyone know how to resolve this issue? Please let me know. > > > Don't use threads. Blocking COM calls will block ALL ruby threads. > You'll have to spawn code to run in a separate process instead. > > Bret > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Thu Jun 7 17:10:54 2007 From: forum-watir-users at openqa.org (matt) Date: Thu, 07 Jun 2007 16:10:54 CDT Subject: [Wtr-general] not able to click ok for the pop up , after a selection from select lis In-Reply-To: <25645049.3681180425146216.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <29296696.3261181250684508.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> It may be a general winClicker issue. I found that in order to get the winClicker to work, the getWindowHandle() had to perform an exact match. This is because many of the IE windows had the same "Microsoft Internet Explorer" text in the title. As a result, the incorrect window handle was returned. And no ok button was present. The behavior that resulted was that the javascript popup window would not dismiss. winClicker.rb, line 236 ### MCB 3/7/2007 *exact match* if title == textCaption[1].to_s This worked for me :-) From forum-watir-users at openqa.org Thu Jun 7 17:17:15 2007 From: forum-watir-users at openqa.org (matt) Date: Thu, 07 Jun 2007 16:17:15 CDT Subject: [Wtr-general] Not able to find the title of newly opened window. In-Reply-To: <31585769.5831180588832842.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <28774252.3491181251065197.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> In many cases, the application I am testing pops up windows with *no* title. As a result, I sometimes encounter similar experiences to you. In these circumstances, right click on the page to get some part of the URL. Then do something like: browser = Watir::IE.attach(:url,/match_string/) In this way, you can define a regular expression to match against the URL. In many cases, the info on the page is reflected in the name of the page you are accessing. For example, say the "Order History" page does not contain a title. But, the "Order History" page is contained in the ".../ordhist.asp" URL. You could execute something like: browser = Watir::IE.attach(:url,/ordhist.asp/) Hope this helps From forum-watir-users at openqa.org Thu Jun 7 19:39:38 2007 From: forum-watir-users at openqa.org (Norris) Date: Thu, 07 Jun 2007 18:39:38 CDT Subject: [Wtr-general] Trouble selecting list box item - Any suggestions Message-ID: <36873209.4231181259608563.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I'm currently having trouble selecting a list box item, any solutions? For example, I'm trying to select the Quantity from the attached Gap site, but I can't. http://www.gap.com/browse/product.do?cid=7389&pid=453549 Any suggestions will help. Thanks in advance. From christopher.mcmahon at gmail.com Thu Jun 7 19:46:25 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 7 Jun 2007 17:46:25 -0600 Subject: [Wtr-general] Trouble selecting list box item - Any suggestions In-Reply-To: <36873209.4231181259608563.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <36873209.4231181259608563.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70706071646w7d51ba84x709c2bb832cb46bb@mail.gmail.com> On 6/7/07, Norris wrote: > Hi, > > I'm currently having trouble selecting a list box item, any solutions? > > For example, I'm trying to select the Quantity from the attached Gap site, but I can't. > > http://www.gap.com/browse/product.do?cid=7389&pid=453549 I hope Charley answers this. Firefox DOM Inspector doesn't recognize that Quantity box. From forum-watir-users at openqa.org Thu Jun 7 20:01:37 2007 From: forum-watir-users at openqa.org (Norris) Date: Thu, 07 Jun 2007 19:01:37 CDT Subject: [Wtr-general] Trouble selecting list box item - Any suggestions?? In-Reply-To: <72799cd70706071646w7d51ba84x709c2bb832cb46bb@mail.gmail.com> Message-ID: <37360834.4341181260928024.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks for trying. I can't do it with explorer either. Anyone else? From hiriumi at gmail.com Thu Jun 7 20:03:03 2007 From: hiriumi at gmail.com (Hayato Iriumi) Date: Thu, 7 Jun 2007 17:03:03 -0700 Subject: [Wtr-general] Modal dialog In-Reply-To: <46684E8A.2050402@pettichord.com> References: <41417239.19211181185848527.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <46684E8A.2050402@pettichord.com> Message-ID: <50c958a0706071703xead8c69nda57a227ed74b8d7@mail.gmail.com> I spawned another process, but no luck. I tried system and exec, but Ruby waits for the line to finish. Any other way to spawn another process? On 6/7/07, Bret Pettichord wrote: > Hayato wrote: > > Does anyone know how to resolve this issue? Please let me know. > > > Don't use threads. Blocking COM calls will block ALL ruby threads. > You'll have to spawn code to run in a separate process instead. > > Bret > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From charley.baker at gmail.com Thu Jun 7 20:04:07 2007 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 7 Jun 2007 18:04:07 -0600 Subject: [Wtr-general] Trouble selecting list box item - Any suggestions In-Reply-To: <72799cd70706071646w7d51ba84x709c2bb832cb46bb@mail.gmail.com> References: <36873209.4231181259608563.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <72799cd70706071646w7d51ba84x709c2bb832cb46bb@mail.gmail.com> Message-ID: Norris, This will work with Watir 1.5: ie.select_list(:id, 'qtyDropDown').option(:value, '5').select Send me an email, I'm curious to hear what you guys are doing and glad to see you coming out to mailing lists. -Charley On 6/7/07, Chris McMahon wrote: > > On 6/7/07, Norris wrote: > > Hi, > > > > I'm currently having trouble selecting a list box item, any solutions? > > > > For example, I'm trying to select the Quantity from the attached Gap > site, but I can't. > > > > http://www.gap.com/browse/product.do?cid=7389&pid=453549 > > I hope Charley answers this. Firefox DOM Inspector doesn't recognize > that Quantity box. > _______________________________________________ > 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/20070607/f32fe003/attachment-0001.html From forum-watir-users at openqa.org Thu Jun 7 20:47:24 2007 From: forum-watir-users at openqa.org (Norris) Date: Thu, 07 Jun 2007 19:47:24 CDT Subject: [Wtr-general] Trouble selecting list box item - Any suggestions In-Reply-To: Message-ID: <39588411.4511181263674607.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi Charley, I don't think Watir 1.5 is out yet. What email address can I reach you at? From arcteryx at comcast.net Thu Jun 7 21:47:34 2007 From: arcteryx at comcast.net (Jason Darling) Date: Thu, 7 Jun 2007 20:47:34 -0500 Subject: [Wtr-general] forum do not get the postings made using themailing list In-Reply-To: <72799cd70706071018y5607e3d6g6c96d9bcca298351@mail.gmail.com> Message-ID: Bret, +2. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Chris McMahon Sent: Thursday, June 07, 2007 12:19 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] forum do not get the postings made using themailing list > Because of the increased traffic on this list and the ongoing troubles > we have had keeping the forums and mailing list synchronized, I have > been considering migrating watir-general to google groups. I would like > to hear comments on this idea, as well as other suggestions. +1 Now that I'm subscribed to selenium and selenium-rc groups also, I'm really missing the yahoo/google config options that openqa doesn't have. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From forum-watir-users at openqa.org Thu Jun 7 23:28:56 2007 From: forum-watir-users at openqa.org (sapna) Date: Thu, 07 Jun 2007 22:28:56 CDT Subject: [Wtr-general] To view the message send based on ID created. In-Reply-To: Message-ID: <37954910.5541181273366580.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I think this [ie.link(:href, /id=1274/).click] will help me out but I have another question for this as the id created is dynamic it keep changing for every new transaction. So I need to make transaction and navigate to message page click on the Bill Payment Inquiry link based on the current ID created. So how do I fetch the ID. Regards Sapna From forum-watir-users at openqa.org Fri Jun 8 00:02:20 2007 From: forum-watir-users at openqa.org (sapna) Date: Thu, 07 Jun 2007 23:02:20 CDT Subject: [Wtr-general] To click on the text link which is the combination of number and text Message-ID: <29235712.5601181275370806.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I had posted this question earlier but could not get any answere to this. I need to click on the text link which has combination of number and text. It looks like

Welcome, you have 2 new messages.

. The number is actually the total count of messages received so number keep changing how can I handle this. Regards Sapna From forum-watir-users at openqa.org Fri Jun 8 00:12:33 2007 From: forum-watir-users at openqa.org (sapna) Date: Thu, 07 Jun 2007 23:12:33 CDT Subject: [Wtr-general] How to capture mail box icon Message-ID: <26963774.5691181275983032.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, Help me understand how to do this. I need to capture mail box icon and want to verify whether the mail box is open or closed. Kindly treat this as high priority. Regards Sapna From forum-watir-users at openqa.org Fri Jun 8 00:21:35 2007 From: forum-watir-users at openqa.org (sandeep) Date: Thu, 07 Jun 2007 23:21:35 CDT Subject: [Wtr-general] To click on the text link which is the combination of number and text In-Reply-To: <29235712.5601181275370806.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <33064564.5771181276525536.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Let me know if this works ie.link(:text, /[0-9]+ new messages/).click From forum-watir-users at openqa.org Fri Jun 8 00:31:53 2007 From: forum-watir-users at openqa.org (sapna) Date: Thu, 07 Jun 2007 23:31:53 CDT Subject: [Wtr-general] To click on the text link which is the combination of number and text In-Reply-To: <33064564.5771181276525536.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37418225.5831181277143594.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks Sandeep................ From forum-watir-users at openqa.org Fri Jun 8 00:38:41 2007 From: forum-watir-users at openqa.org (sapna) Date: Thu, 07 Jun 2007 23:38:41 CDT Subject: [Wtr-general] Fetching Today's date in the mm/dd/yyyy In-Reply-To: Message-ID: <41500271.5891181277551895.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank you............... From forum-watir-users at openqa.org Fri Jun 8 00:40:04 2007 From: forum-watir-users at openqa.org (sapna) Date: Thu, 07 Jun 2007 23:40:04 CDT Subject: [Wtr-general] How to get the all the content of list box into variable In-Reply-To: <23175286.341180503331196.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <38348545.5951181277634711.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank you................. From forum-watir-users at openqa.org Fri Jun 8 00:42:04 2007 From: forum-watir-users at openqa.org (sapna) Date: Thu, 07 Jun 2007 23:42:04 CDT Subject: [Wtr-general] How to give the next line b/w the sentences for window text. In-Reply-To: Message-ID: <25946119.6011181277754875.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank u............... From forum-watir-users at openqa.org Fri Jun 8 01:20:55 2007 From: forum-watir-users at openqa.org (Norris) Date: Fri, 08 Jun 2007 00:20:55 CDT Subject: [Wtr-general] Trouble selecting list box item - Any suggestions In-Reply-To: <36873209.4231181259608563.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <27057017.6071181280085433.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks Charley. This worked. In addition, do you know how I can select the size of the waist and length? Thanks in advance. From forum-watir-users at openqa.org Fri Jun 8 03:36:43 2007 From: forum-watir-users at openqa.org (Jet Liu) Date: Fri, 08 Jun 2007 02:36:43 CDT Subject: [Wtr-general] Scheduler In-Reply-To: <31890691.16621175001281665.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36911169.7561181288233841.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, When I set up my schedule using something like "C:\Program Files\Mozilla Firefox\firefox.exe" -chrome "chrome://selenium-ide/content/selenium/TestRunner.html?baseURL=http://www.xyz.com&test=file:///C:\Documents%20and%20Settings\Test%20User\Desktop\Selenium\us/testsuite.html" -height 750 -width 1100 My question is, how do I actually make it start to run all the tests? That is, is there a way to make it start running without someone having to manually click the "Run All Tests" button in the TestRunner? Any tips much appreciated. Thanks. Cheers, Jet From forum-watir-users at openqa.org Fri Jun 8 04:52:44 2007 From: forum-watir-users at openqa.org (mihai) Date: Fri, 08 Jun 2007 03:52:44 CDT Subject: [Wtr-general] click link in iframe? In-Reply-To: <30923741.21081181199273196.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36972934.8281181292794146.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> no ideea? From forum-watir-users at openqa.org Fri Jun 8 06:21:57 2007 From: forum-watir-users at openqa.org (Simba) Date: Fri, 08 Jun 2007 05:21:57 CDT Subject: [Wtr-general] Best Combination of Ruby and Watir Message-ID: <30534709.9331181298147654.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, Since one month I have been trying to implement Watir in our project , but still now i am struggling to decide which combiniation of ruby & watir suites my project.Presently i am using Raby 1.8.2 & Watir-1.5.1.1158 this will work fine for javascriptscript alert box 's but won't support Modal_Dialog & Javascript events,Please some body tell me in which combination of ruby and watir i can get these Modal_Dialog & Javascript events features. Thanks Simba From zeljko.filipin at gmail.com Fri Jun 8 06:43:11 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 8 Jun 2007 12:43:11 +0200 Subject: [Wtr-general] forum do not get the postings made using the mailing list In-Reply-To: <46683561.5010608@pettichord.com> References: <4667C8E9.7050003@gslab.com> <46683561.5010608@pettichord.com> Message-ID: On 6/7/07, Bret Pettichord wrote: > > I have been considering migrating watir-general to google groups. +1 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070608/c742c101/attachment.html From forum-watir-users at openqa.org Fri Jun 8 06:43:31 2007 From: forum-watir-users at openqa.org (Alister Scott) Date: Fri, 08 Jun 2007 05:43:31 CDT Subject: [Wtr-general] Best Combination of Ruby and Watir In-Reply-To: <30534709.9331181298147654.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <34084037.9741181299441297.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> There is a Watir Extension Toolkit (WET) that may be of use to you. It supports modal dialogs. The details are on this site at http://www.openqa.org/wet/ From zeljko.filipin at gmail.com Fri Jun 8 06:56:21 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 8 Jun 2007 12:56:21 +0200 Subject: [Wtr-general] How to capture mail box icon In-Reply-To: <26963774.5691181275983032.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <26963774.5691181275983032.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi Sapna, Sometimes I would like to be able to read mind of other people, but unfortunately, I can not do that. Good news is that I do not have to read you mind to be able to help you. You just need to post HTML of that image when it is opened and closed. :) Zeljko -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070608/a8b0ce19/attachment-0001.html From forum-watir-users at openqa.org Fri Jun 8 06:58:19 2007 From: forum-watir-users at openqa.org (Simba) Date: Fri, 08 Jun 2007 05:58:19 CDT Subject: [Wtr-general] NoMethodError :Undefined method "Process_id" for 1808:Fixnum Message-ID: <27770958.10281181300329871.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> When i Run Below is code in IRB ,its throwinf error require 'watir' ie=Watir::IE.start("www.google.com") Error : NoMethodError :Undefined method "Process_id" for 1808:Fixnum Please some body tell me why this error is coming? Before Going into IRB , I had installed Win32-process 0.4.0 & Watir-1.5.1.1158.gem thanks Vinod mp From esjewett at gmail.com Fri Jun 8 07:18:16 2007 From: esjewett at gmail.com (Ethan Jewett) Date: Fri, 8 Jun 2007 06:18:16 -0500 Subject: [Wtr-general] Modal dialog In-Reply-To: <50c958a0706071703xead8c69nda57a227ed74b8d7@mail.gmail.com> References: <41417239.19211181185848527.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <46684E8A.2050402@pettichord.com> <50c958a0706071703xead8c69nda57a227ed74b8d7@mail.gmail.com> Message-ID: <68f4a0e80706080418u2902b091vca6d347f944879d8@mail.gmail.com> Does the following work? http://rubyforge.org/pipermail/wtr-general/2005-April/001461.html There are a couple of other examples on the FAQ including one that uses click_no_wait, which I think won't block the current process, though you'll have to handle timing issues yourself as with the startClicker exampe: http://wiki.openqa.org/display/WTR/FAQ Ethan On 6/7/07, Hayato Iriumi wrote: > I spawned another process, but no luck. I tried system and exec, but > Ruby waits for the line to finish. Any other way to spawn another > process? > > On 6/7/07, Bret Pettichord wrote: > > Hayato wrote: > > > Does anyone know how to resolve this issue? Please let me know. > > > > > Don't use threads. Blocking COM calls will block ALL ruby threads. > > You'll have to spawn code to run in a separate process instead. > > > > Bret > > > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From esjewett at gmail.com Fri Jun 8 07:38:17 2007 From: esjewett at gmail.com (Ethan Jewett) Date: Fri, 8 Jun 2007 06:38:17 -0500 Subject: [Wtr-general] click link in iframe? In-Reply-To: <36972934.8281181292794146.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <30923741.21081181199273196.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <36972934.8281181292794146.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <68f4a0e80706080438s4ec237ave1beb9bdc100f9cf@mail.gmail.com> Mihai, What is the code you are trying to use to click this menu link? It will need to be something like ie.frame(:index, 1).link(:text, "Link text here").click You might want to consider using something like the IE Developer Toolbar or Firebug to see what is inside the iframe. Ethan On 6/8/07, mihai wrote: > no ideea? > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From cjiang at ece.utexas.edu Fri Jun 8 10:12:33 2007 From: cjiang at ece.utexas.edu (Chong Jiang) Date: Fri, 8 Jun 2007 09:12:33 -0500 Subject: [Wtr-general] frames and url() Message-ID: Hello, Is there some way to return the url of a frame, for example, ie.frame(:index, 1), so I can navigate to the page with a goto? Thanks in advance, Chong -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070608/00f415c4/attachment.html From charley.baker at gmail.com Fri Jun 8 10:41:29 2007 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 8 Jun 2007 08:41:29 -0600 Subject: [Wtr-general] Scheduler In-Reply-To: <36911169.7561181288233841.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <31890691.16621175001281665.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <36911169.7561181288233841.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: You might want to ask this on the Selenium forum. On 6/8/07, Jet Liu wrote: > > Hi, > When I set up my schedule using something like > > "C:\Program Files\Mozilla Firefox\firefox.exe" -chrome > "chrome://selenium-ide/content/selenium/TestRunner.html?baseURL= > http://www.xyz.com&test=file:///C:\Documents%20and%20Settings\Test%20User\Desktop\Selenium\us/testsuite.html" > -height 750 -width 1100 > > My question is, how do I actually make it start to run all the tests? That > is, is there a way to make it start running without someone having to > manually click the "Run All Tests" button in the TestRunner? > > Any tips much appreciated. > > Thanks. > > Cheers, > Jet > _______________________________________________ > 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/20070608/e1b772fa/attachment.html From forum-watir-users at openqa.org Fri Jun 8 10:50:07 2007 From: forum-watir-users at openqa.org (mihai) Date: Fri, 08 Jun 2007 09:50:07 CDT Subject: [Wtr-general] click link in iframe? In-Reply-To: <30923741.21081181199273196.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <33365665.12851181314237879.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> tnx, i had a problem with ie.show_frames...it didn't display the frame..now that it works i've solve my problem too just like u said with ie.frame(:index,xx).frame(:index,yy)... and so on From forum-watir-users at openqa.org Fri Jun 8 10:54:44 2007 From: forum-watir-users at openqa.org (mihai) Date: Fri, 08 Jun 2007 09:54:44 CDT Subject: [Wtr-general] mouse right click? Message-ID: <27401231.12911181314515007.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> can i send to a control mouse right click without using autoit? ..fireevent("rightclick") doesn't simulate right click on a html page From charley.baker at gmail.com Fri Jun 8 11:04:00 2007 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 8 Jun 2007 09:04:00 -0600 Subject: [Wtr-general] Trouble selecting list box item - Any suggestions In-Reply-To: <27057017.6071181280085433.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <36873209.4231181259608563.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <27057017.6071181280085433.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Sure it's pretty easy. The sizes all show up in divs with size swatch id tags, you can see them all with the IE dev toolbar. Sold out sizes will have a div class of soldOut, so look out for those. Watir 1.5 is coming out soon, until then, you can install a prebuilt development gem : http://wiki.openqa.org/display/WTR/Development+Builds Or follow the FAQ for installing a gem from development source. What's your last name? -c On 6/7/07, Norris wrote: > > Thanks Charley. This worked. In addition, do you know how I can select > the size of the waist and length? Thanks in advance. > _______________________________________________ > 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/20070608/60d93ef3/attachment.html From forum-watir-users at openqa.org Fri Jun 8 11:41:51 2007 From: forum-watir-users at openqa.org (reinier) Date: Fri, 08 Jun 2007 10:41:51 CDT Subject: [Wtr-general] Link description from file In-Reply-To: <26550969.661181206864161.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <32671931.13351181317341377.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I have the same issue. Anyone knows how to handle regular expression retrieved from a file? (so they are a string when used) From paul.rogers at shaw.ca Fri Jun 8 14:24:11 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 08 Jun 2007 12:24:11 -0600 Subject: [Wtr-general] mouse right click? References: <27401231.12911181314515007.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <025f01c7a9fa$364a0fd0$6400a8c0@laptop> search the archives for onContextMenu - i posted some code to do right clicks a few months back Paul ----- Original Message ----- From: "mihai" To: Sent: Friday, June 08, 2007 8:54 AM Subject: [Wtr-general] mouse right click? > can i send to a control mouse right click without using autoit? > ..fireevent("rightclick") doesn't simulate right click on a html page > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From charley.baker at gmail.com Fri Jun 8 14:28:51 2007 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 8 Jun 2007 12:28:51 -0600 Subject: [Wtr-general] NoMethodError :Undefined method "Process_id" for 1808:Fixnum In-Reply-To: <27770958.10281181300329871.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <27770958.10281181300329871.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: You might try updating the win32-process gem. Latest version is 0.5.2. There was a similar posting on the win32-process list on rubyforge. That may or may not resolve the issue. -Charley On 6/8/07, Simba wrote: > > When i Run Below is code in IRB ,its throwinf error > require 'watir' > ie=Watir::IE.start("www.google.com") > > Error : > NoMethodError :Undefined method "Process_id" for 1808:Fixnum > > Please some body tell me why this error is coming? > > Before Going into IRB , I had installed Win32-process 0.4.0 & > Watir-1.5.1.1158.gem > > thanks > Vinod mp > _______________________________________________ > 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/20070608/921f853c/attachment-0001.html From bret at pettichord.com Fri Jun 8 14:42:13 2007 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 08 Jun 2007 13:42:13 -0500 Subject: [Wtr-general] Best Combination of Ruby and Watir In-Reply-To: <30534709.9331181298147654.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <30534709.9331181298147654.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <4669A305.4080609@pettichord.com> Simba wrote: > Since one month I have been trying to implement Watir in our project , but still now i am struggling to decide which combiniation of ruby & watir suites my project.Presently i am using Raby 1.8.2 & Watir-1.5.1.1158 this will work fine for javascriptscript alert box 's but won't support Modal_Dialog & Javascript events,Please some body tell me in which combination of ruby and watir i can get these Modal_Dialog & Javascript events features. The IE#modal_dialog command only works with Ruby 1.8.2. You can use the latest version of Watir 1.5. Bret From charley.baker at gmail.com Fri Jun 8 14:51:13 2007 From: charley.baker at gmail.com (charley.baker at gmail.com) Date: Fri, 08 Jun 2007 18:51:13 -0000 Subject: [Wtr-general] test Message-ID: <1181328673.605540.24240@d30g2000prg.googlegroups.com> test From jeff.fry at gmail.com Fri Jun 8 15:28:40 2007 From: jeff.fry at gmail.com (Jeff Fry) Date: Fri, 8 Jun 2007 12:28:40 -0700 Subject: [Wtr-general] Best Combination of Ruby and Watir In-Reply-To: <4669A305.4080609@pettichord.com> References: <30534709.9331181298147654.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <4669A305.4080609@pettichord.com> Message-ID: <970956b0706081228g25486f3y7f670474a6321f7f@mail.gmail.com> On 6/8/07, Bret Pettichord wrote: > > > The IE#modal_dialog command only works with Ruby 1.8.2. You can use the > latest version of Watir 1.5. > > Oops. This may not be clear in the rdocs. To be clear, are you saying that the IE#modal_dialog command works with ruby 1.8.2 but not with earlier OR later versions? Currently readme.rb says: Best is to use Ruby 1.8.2-14 or later. Should I change that? -- http://testingjeff.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070608/e39e3a75/attachment.html From charley.baker at gmail.com Fri Jun 8 16:16:46 2007 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 8 Jun 2007 14:16:46 -0600 Subject: [Wtr-general] Best Combination of Ruby and Watir In-Reply-To: <970956b0706081228g25486f3y7f670474a6321f7f@mail.gmail.com> References: <30534709.9331181298147654.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <4669A305.4080609@pettichord.com> <970956b0706081228g25486f3y7f670474a6321f7f@mail.gmail.com> Message-ID: modal_dialog only works for 1.8.2 currently since that's the version of Ruby that the win32ole.so library was compiled against. Bret added an error if you try to use this feature in newer versions of Ruby. If you need modal_dialog, you're limited to 1.8.2. -c On 6/8/07, Jeff Fry wrote: > > > > On 6/8/07, Bret Pettichord wrote: > > > > > > The IE#modal_dialog command only works with Ruby 1.8.2. You can use the > > latest version of Watir 1.5. > > > > Oops. This may not be clear in the rdocs. To be clear, are you saying > that the IE#modal_dialog command works with ruby 1.8.2 but not with > earlier OR later versions? > > Currently readme.rb says: > Best is to use Ruby 1.8.2-14 or later. > > Should I change that? > > > -- > http://testingjeff.wordpress.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070608/14503dd3/attachment.html From jeff.fry at gmail.com Fri Jun 8 16:53:51 2007 From: jeff.fry at gmail.com (Jeff Fry) Date: Fri, 8 Jun 2007 13:53:51 -0700 Subject: [Wtr-general] Best Combination of Ruby and Watir In-Reply-To: References: <30534709.9331181298147654.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <4669A305.4080609@pettichord.com> <970956b0706081228g25486f3y7f670474a6321f7f@mail.gmail.com> Message-ID: <970956b0706081353l356b4530kebc93fbea9639941@mail.gmail.com> Thanks. Is this an accurate correction then? To Install Ruby: http://ruby-lang.org Best is to use Ruby 1.8.2-14. Most of Watir works with newer versions of ruby as well, but IE#modal_dialog requires the 1.8.2 WIN32OLE library. It will NOT work with Ruby 1.8.1-13. (This version of Ruby has a bad WIN32OLE library.) Jeff On 6/8/07, Charley Baker wrote: > > modal_dialog only works for 1.8.2 currently since that's the version of > Ruby that the win32ole.so library was compiled against. Bret added an > error if you try to use this feature in newer versions of Ruby. If you need > modal_dialog, you're limited to 1.8.2. > > -c > > On 6/8/07, Jeff Fry wrote: > > > > > > > On 6/8/07, Bret Pettichord wrote: > > > > > > > > > The IE#modal_dialog command only works with Ruby 1.8.2. You can use > > > the > > > latest version of Watir 1.5. > > > > > > Oops. This may not be clear in the rdocs. To be clear, are you saying > > that the IE#modal_dialog command works with ruby 1.8.2 but not with > > earlier OR later versions? > > > > Currently readme.rb says: > > Best is to use Ruby 1.8.2-14 or later. > > > > Should I change that? > > > > > > -- > > http://testingjeff.wordpress.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 > -- http://testingjeff.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070608/7c524b09/attachment.html From bret at pettichord.com Fri Jun 8 17:15:30 2007 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 08 Jun 2007 16:15:30 -0500 Subject: [Wtr-general] Best Combination of Ruby and Watir In-Reply-To: <970956b0706081353l356b4530kebc93fbea9639941@mail.gmail.com> References: <30534709.9331181298147654.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <4669A305.4080609@pettichord.com> <970956b0706081228g25486f3y7f670474a6321f7f@mail.gmail.com> <970956b0706081353l356b4530kebc93fbea9639941@mail.gmail.com> Message-ID: <4669C6F2.70807@pettichord.com> I suggest this: Best is to use Ruby 1.8.2-14 or later. However, if you are using the Watir::IE#modal_dialog method, you must use Ruby 1.8.2-14 and not a more recent version. Watir (in general) will not work with Ruby 1.8.1-13. (This version of Ruby has a bad WIN32OLE library.) Jeff Fry wrote: > Thanks. Is this an accurate correction then? > > To Install Ruby: http://ruby-lang.org > Best is to use Ruby 1.8.2-14. > Most of Watir works with newer versions of ruby as well, but > IE#modal_dialog requires the 1.8.2 WIN32OLE library. > It will NOT work with Ruby 1.8.1-13. (This version of Ruby has a > bad WIN32OLE library.) > > Jeff > > On 6/8/07, *Charley Baker* > wrote: > > modal_dialog only works for 1.8.2 currently since that's the > version of Ruby that the win32ole.so library was compiled against. > Bret added an error if you try to use this feature in newer > versions of Ruby. If you need modal_dialog, you're limited to 1.8.2. > > -c > > On 6/8/07, *Jef