From zeljko.filipin at gmail.com Tue Aug 1 03:59:17 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 1 Aug 2006 09:59:17 +0200 Subject: [Wtr-general] Watir 1.5 In-Reply-To: <6CF3AA425295C7479483AC0018EDF98B06EF46D6@MI8NYCMAIL03.Mi8.com> References: <6CF3AA425295C7479483AC0018EDF98B06EF46D6@MI8NYCMAIL03.Mi8.com> Message-ID: You have probably installed watir 1.4.1 with one-click installer. The most simple solution is to uninstall ruby, install it again and then install watir gem. ?eljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060801/19ec7484/attachment.html From mrussell at inpses.co.uk Tue Aug 1 03:58:49 2006 From: mrussell at inpses.co.uk (Max Russell) Date: Tue, 1 Aug 2006 08:58:49 +0100 Subject: [Wtr-general] Test Harness Message-ID: Please ignore my last post- I dug into my script and realized that because my asserts were wrong, the harness was spitting out errors. Thanks for the help! max Max Russell test Analyst. InPS Tel: 01382 223900 Fax: 01382 204488 Visit our Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of In Practice Systems Limited or any of its affiliates. If you are not the intended recipient please contact is.helpdesk at inps.co.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060801/b529c59c/attachment.html From bret at pettichord.com Tue Aug 1 04:19:49 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 1 Aug 2006 03:19:49 -0500 Subject: [Wtr-general] 40 K limit to attachments In-Reply-To: References: Message-ID: On 7/31/06, Zeljko Filipin wrote: > > I would not even look at 40K+ html. All I really need to provide some help > is a little snippet of relevant html. > I see your point, although sometimes people send us the wrong snippet. Esp. when it comes to javascript. (They often send the functions when we need to see the html they are attached to). But i guess they really need to learn how to figure out where the html is themselves if they are going to be successful with watir. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060801/f91e6ff6/attachment.html From zeljko.filipin at gmail.com Tue Aug 1 04:20:34 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 1 Aug 2006 10:20:34 +0200 Subject: [Wtr-general] Want to run my test in slow speed?? In-Reply-To: <44CE93E1.20407@pheedo.com> References: <44CE8C8F.6060909@tower-mt.com> <44CE93E1.20407@pheedo.com> Message-ID: As simple as: ie.set_slow_speed ?eljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060801/d0afef79/attachment.html From nivetha at thoughtworks.com Tue Aug 1 05:41:00 2006 From: nivetha at thoughtworks.com (Nivetha Padmanaban) Date: Tue, 1 Aug 2006 15:11:00 +0530 Subject: [Wtr-general] AJAX applications. Message-ID: Does Watir support Ajax applications?? actually speaking i havent seen how ajax application will look like. i just know that our application will be an ajax application. can u tell me what is ajax and how it looks like, any sample site? Regards, Nivetha. Email - nivetha at thoughtworks.com Mobile - (0) 98807 17518 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060801/6d95377f/attachment.html From zeljko.filipin at gmail.com Tue Aug 1 05:55:41 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 1 Aug 2006 11:55:41 +0200 Subject: [Wtr-general] AJAX applications. In-Reply-To: References: Message-ID: http://en.wikipedia.org/wiki/AJAX Zeljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060801/210891a4/attachment.html From Adrian.Lewis at tnt.com Tue Aug 1 09:59:17 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Tue, 1 Aug 2006 14:59:17 +0100 Subject: [Wtr-general] retrieve data from a specific tags Message-ID: Hi, Is it possible to retrieve data from specific tags? For example I just want to pull out the textual node from this:
The user is assigned to territories after the specified end date
Cheers Aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From zeljko.filipin at gmail.com Tue Aug 1 10:13:33 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 1 Aug 2006 16:13:33 +0200 Subject: [Wtr-general] retrieve data from a specific tags In-Reply-To: References: Message-ID: Try ie.div(:class, "tnt-error").text Zeljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060801/10bfac69/attachment.html From Adrian.Lewis at tnt.com Tue Aug 1 10:46:17 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Tue, 1 Aug 2006 15:46:17 +0100 Subject: [Wtr-general] retrieve data from a specific tags In-Reply-To: Message-ID: Hi Zeljko $ie.div(:class, "tnt-error").text err: test failed: unknown way of finding a DIV ( {what} )" ["c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1023:in `getNonControlObject'", and this p $ie.table(:index, '15').text err: "test failed: undefined method `text' for #" cheers aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From zeljko.filipin at gmail.com Tue Aug 1 11:03:06 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 1 Aug 2006 17:03:06 +0200 Subject: [Wtr-general] retrieve data from a specific tags In-Reply-To: References: Message-ID: I guess it would not work without the latest watir. http://wiki.openqa.org/display/WTR/Development+Builds It worked for me with watir 1.5.1.1045. ?eljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060801/c0e218f7/attachment.html From jfitisoff at yahoo.com Tue Aug 1 11:43:48 2006 From: jfitisoff at yahoo.com (John Fitisoff) Date: Tue, 1 Aug 2006 08:43:48 -0700 (PDT) Subject: [Wtr-general] AJAX applications. In-Reply-To: Message-ID: <20060801154348.24906.qmail@web54108.mail.yahoo.com> <> YES. I recently started for a company that was using HtmlUnit. Our app used lots of Ajax and I had lots of problems writing tests for certain pages. The main problem was that HtmlUnit emulates a browser rather than actually driving one, and the javascript support that you'd ideally want isn't actually there. Watir actually drives a browser rather than emulating one, so the asynch call problems and javascript problems you might see with an emulation-type tool simply don't exist. Can't point you to an Ajax site off the top of my head, but think of Ajax pages as HTML pages with a lot of javascript thrown in. It doesn't make a great deal of difference in how you would write Watir tests. --- Nivetha Padmanaban wrote: > Does Watir support Ajax applications?? actually > speaking i havent seen how > ajax application will look like. i just know that > our application will be > an ajax application. > > can u tell me what is ajax and how it looks like, > any sample site? > > Regards, > Nivetha. > Email - nivetha at thoughtworks.com > Mobile - (0) 98807 17518> _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From Adrian.Lewis at tnt.com Tue Aug 1 12:09:28 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Tue, 1 Aug 2006 17:09:28 +0100 Subject: [Wtr-general] RegEx && 151.1054 In-Reply-To: <20060801154348.24906.qmail@web54108.mail.yahoo.com> Message-ID: I think we got a problem with RegEx && watir 151.1054 this'll work fine def password_field;$ie.text_field(:name, 'password');end this def password_field;$ie.text_field(:name, /password/);end rurturned on error of "test failed: \n OLE error code:0 in \n \n HRESULT error code:0x80010108\n The object invoked has disconnected from its clients." ["c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1054/./watir.rb:3863:in `method_missing'", "c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1054 /./watir.rb:3863:in `doKeyPress'", " Why am I using RegEx? Cos in different environments my objects may have different prefixes or suffixes Cheers aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From Adrian.Lewis at tnt.com Tue Aug 1 12:12:57 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Tue, 1 Aug 2006 17:12:57 +0100 Subject: [Wtr-general] retrieve data from a specific tags In-Reply-To: Message-ID: Zeljko wrote: > ie.div(:class, "tnt-error").text top dollar. aidy _ --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From charley.baker at gmail.com Tue Aug 1 14:05:21 2006 From: charley.baker at gmail.com (Charley Baker) Date: Tue, 1 Aug 2006 12:05:21 -0600 Subject: [Wtr-general] RegEx && 151.1054 In-Reply-To: References: <20060801154348.24906.qmail@web54108.mail.yahoo.com> Message-ID: Aidy, I've been using regexs and consistently using the latest releases of Watir. As helpful as it is, I haven't had any problems. Curious error message you're getting, it doesn't look like the regex is not finding the html element, but that it's no longer available. If changing back and forth between a string and regex for that field is consistently showing the same results there's something I'm not seeing. Try it with other controls, debug if you can, otherwise I'm at a loss. -Charley On 8/1/06, Adrian Lewis wrote: > > I think we got a problem with RegEx && watir 151.1054 > > this'll work fine > > def password_field;$ie.text_field(:name, 'password');end > > this > > def password_field;$ie.text_field(:name, /password/);end > > rurturned on error of > > "test failed: \n OLE error code:0 in \n Description>\n > HRESULT error code:0x80010108\n The object invoked has disconnected > from its clients." > ["c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1054/./watir.rb:3863:in > `method_missing'", "c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1054 > /./watir.rb:3863:in `doKeyPress'", " > > Why am I using RegEx? Cos in different environments my objects may have > different prefixes or suffixes > > Cheers > > aidy > > > > > --------------------------------------------------------------------------------------------------------------- > This message and any attachment are confidential and may be privileged or > otherwise protected from disclosure. > If you are not the intended recipient, please telephone or email the > sender and delete this message and any attachment from your system. > If you are not the intended recipient you must not copy this message or > attachment or disclose the contents to any other person. > > --------------------------------------------------------------------------------------------------------------- > _______________________________________________ > 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/20060801/6b7152be/attachment.html From christopher.mcmahon at gmail.com Tue Aug 1 15:44:51 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 1 Aug 2006 12:44:51 -0700 Subject: [Wtr-general] porting Watir to Selenium Message-ID: <72799cd70608011244sfdfa3exe5e6c8b3fdcc3df5@mail.gmail.com> Jason Huggins is a very smart guy: http://www.jrandolph.com/blog/?p=44 From paul.rogers at shaw.ca Tue Aug 1 20:10:52 2006 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 01 Aug 2006 18:10:52 -0600 Subject: [Wtr-general] german chars in the browser Message-ID: my web page contains "Geben Sie Ihre Telefonnummer (tags?ber)" In case it doesnt show correctly, near the end is a u with 2 dots above it. Im sure there is a correct term, but Im no linguist. If I do: ie.text I get => "Geben Sie Ihre Telefonnummer (tags\374ber" Can any one suggest a work around, solution etc? Im sure there are other letters that will do the same thing. Im thinking along the lines of class IE def text_with_no_escape_sequence retun self.text.gsub("\374" , "?") end and do the same for other chars. Im sure there is a better way though. Paul From christopher.mcmahon at gmail.com Tue Aug 1 20:21:03 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 1 Aug 2006 17:21:03 -0700 Subject: [Wtr-general] german chars in the browser In-Reply-To: References: Message-ID: <72799cd70608011721k7722f559ta2fb46a5cc728397@mail.gmail.com> > Can any one suggest a work around, solution etc? Im sure there are other letters that will do the same thing. I've got a problem with UTF-8 characters doing bad things to SOAP clients, too, so I'd also be interested. From marco.neri at police.vic.gov.au Tue Aug 1 20:28:55 2006 From: marco.neri at police.vic.gov.au (Neri, Marco) Date: Wed, 2 Aug 2006 10:28:55 +1000 Subject: [Wtr-general] Attaching to windows problem Message-ID: I'm having similar issues. running watir 1.5.1.1065 ruby 1.8.2 win xp sp2 error trace 1) Error: testLoadAuditHome(TC_testLoadAuditHome): Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with title of (?-mix:Audit) c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1065/./watir.rb:1439:in `attach_b rowser_window' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1065/./watir.rb:1314:in `attach_i nit' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1065/./watir.rb:1307:in `attach' ./Modules\ModuleBrowser.rb:8:in `startBrowser' ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Attebery, Bill Sent: Friday, 23 June 2006 03:33 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Attaching to windows problem I'm using Windows XP - SP2 -- more precisely from About Windows Version 5.1 (Build 2600.xpsp_sp2_gdr.050301-1519 : Service Pack 2) and Ruby version: 1.8.2 (I was once under the impression that this was required for watir and haven't had the need to upgrade) Note: I had not installed Watir from a gem, obviously when I did it put it in the gems directories. I had watir files in the C:\ruby\lib\ruby\site_ruby\1.8 directory so I moved the watir.rb and watir folder from here to another location out of my path to make sure it called the right watir files -- did I miss anything here by chance? The error messages refer to watir 1.5 so it seems it's using the correct version. Just wondering, as I said I haven't done this before. ------------------------------ There have been a lot of changes in this code in 1.5 and this code is very sensitive to environment. What version of Windows and Ruby are you using? Bret The content contained in this electronic message is not intended to constitute formation of a contract binding TWTC. TWTC will be contractually bound only upon execution, by an authorized officer, of a contract including agreed terms and conditions or by express application of its tariffs. This message is intended only for the use of the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the sender of this E-Mail or by telephone. ======================================================= The information contained in this email and any files attached may be confidential information to the intended recipient and may be the subject of legal professional privilege or public interest immunity. If you are not the intended recipient, any use, disclosure or copying is unauthorised. If you have received this document in error please telephone 1300 307 082 ******************************************************************* This footnote also confirms that this email message has been swept for the presence of computer viruses. ******************************************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060802/c2dd88c9/attachment.html From marco.neri at police.vic.gov.au Tue Aug 1 21:20:25 2006 From: marco.neri at police.vic.gov.au (Neri, Marco) Date: Wed, 2 Aug 2006 11:20:25 +1000 Subject: [Wtr-general] Attaching to windows problem Message-ID: Found the cause of my problem.. added some extra puts lines to watir.rb _find function def self._find(how, what) shell = WIN32OLE.new("Shell.Application") ieTemp = nil shell.Windows.each do |window| puts window.locationname puts "location url" puts window.locationURL puts "window path" puts window.path #next unless (window.path =~ /Internet Explorer/ rescue false) next unless (window.path =~ /WINDOWS/ rescue false) # this works window.path on my machine is putting out C:\WINDOWS\ and not matching on /Internet Explorer/ Now over to smarter minds than mine to explain where and how the value of window.path is sourced from .. ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Neri, Marco Sent: Wednesday, 2 August 2006 10:29 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Attaching to windows problem I'm having similar issues. running watir 1.5.1.1065 ruby 1.8.2 win xp sp2 error trace 1) Error: testLoadAuditHome(TC_testLoadAuditHome): Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with title of (?-mix:Audit) c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1065/./watir.rb:1439:in `attach_b rowser_window' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1065/./watir.rb:1314:in `attach_i nit' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1065/./watir.rb:1307:in `attach' ./Modules\ModuleBrowser.rb:8:in `startBrowser' ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Attebery, Bill Sent: Friday, 23 June 2006 03:33 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Attaching to windows problem I'm using Windows XP - SP2 -- more precisely from About Windows Version 5.1 (Build 2600.xpsp_sp2_gdr.050301-1519 : Service Pack 2) and Ruby version: 1.8.2 (I was once under the impression that this was required for watir and haven't had the need to upgrade) Note: I had not installed Watir from a gem, obviously when I did it put it in the gems directories. I had watir files in the C:\ruby\lib\ruby\site_ruby\1.8 directory so I moved the watir.rb and watir folder from here to another location out of my path to make sure it called the right watir files -- did I miss anything here by chance? The error messages refer to watir 1.5 so it seems it's using the correct version. Just wondering, as I said I haven't done this before. ------------------------------ There have been a lot of changes in this code in 1.5 and this code is very sensitive to environment. What version of Windows and Ruby are you using? Bret The content contained in this electronic message is not intended to constitute formation of a contract binding TWTC. TWTC will be contractually bound only upon execution, by an authorized officer, of a contract including agreed terms and conditions or by express application of its tariffs. This message is intended only for the use of the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the sender of this E-Mail or by telephone. ======================================================= The information contained in this email and any files attached may be confidential information to the intended recipient and may be the subject of legal professional privilege or public interest immunity. If you are not the intended recipient, any use, disclosure or copying is unauthorised. If you have received this document in error please telephone 1300 307 082 ******************************************************************* This footnote also confirms that this email message has been swept for the presence of computer viruses. ******************************************************************* ======================================================= The information contained in this email and any files attached may be confidential information to the intended recipient and may be the subject of legal professional privilege or public interest immunity. If you are not the intended recipient, any use, disclosure or copying is unauthorised. If you have received this document in error please telephone 1300 307 082 ******************************************************************* This footnote also confirms that this email message has been swept for the presence of computer viruses. ******************************************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060802/6c00ab82/attachment.html From bret at pettichord.com Tue Aug 1 23:32:47 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 1 Aug 2006 22:32:47 -0500 Subject: [Wtr-general] simple solution for basic authentication In-Reply-To: References: Message-ID: On 7/31/06, Danny R. Faught wrote: > > To productize it, I'd recommending adding a credentials method like > Win32::IE::Mechanize uses. I don't understand the $realm argument in this API. Can you explain? Could we drop it? Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060801/c7526b06/attachment.html From vikashkumar051 at yahoo.co.in Wed Aug 2 01:24:18 2006 From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR) Date: Wed, 2 Aug 2006 06:24:18 +0100 (BST) Subject: [Wtr-general] Problem in accessing array element In-Reply-To: Message-ID: <20060802052418.43520.qmail@web7803.mail.in.yahoo.com> Sir, I am storing values from excel to a array name 'data', I am using below code for it. excel = WIN32OLE::new('excel.Application') workbook = excel.Workbooks.Open('E:\sam.xls') worksheet = workbook.Worksheets(1) worksheet.Select excel['Visible'] = true line = '2' data = Array.new while worksheet.Range("a#{line}")['Value'] data << worksheet.Range("a#{line}:u#{line}")['Value'] data.each { |x| print x, "\n\n\n".chomp } puts("\n") line.succ! end Now, I wants to access 3rd element stored in the above array name 'data'. I am facing problem in doing this. Please send me a solution for this. Thanks in Advance Vikash Kumar --------------------------------- Here?s a new way to find what you're looking for - Yahoo! Answers -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060802/addc1f48/attachment.html From manishs at reconnex.net Wed Aug 2 02:18:49 2006 From: manishs at reconnex.net (Manish Sapariya) Date: Wed, 02 Aug 2006 11:48:49 +0530 Subject: [Wtr-general] porting Watir to Selenium In-Reply-To: <72799cd70608011244sfdfa3exe5e6c8b3fdcc3df5@mail.gmail.com> References: <72799cd70608011244sfdfa3exe5e6c8b3fdcc3df5@mail.gmail.com> Message-ID: <44D043C9.6060703@reconnex.net> Hi, I have not used selenium, but was wondering how is the javascript dialog support in selenium. Does watir have upper hand there? Thanks and Regards, Manish On 08/02/2006 01:14 AM, Chris McMahon wrote: > Jason Huggins is a very smart guy: http://www.jrandolph.com/blog/?p=44 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From zeljko.filipin at gmail.com Wed Aug 2 03:51:22 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 2 Aug 2006 09:51:22 +0200 Subject: [Wtr-general] Problem in accessing array element In-Reply-To: <20060802052418.43520.qmail@web7803.mail.in.yahoo.com> References: <20060802052418.43520.qmail@web7803.mail.in.yahoo.com> Message-ID: data[2] contains the third element of your array (array counts from zero: 0, 1, 2, 3...). Zeljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060802/29684fea/attachment.html From nivetha at thoughtworks.com Wed Aug 2 08:01:06 2006 From: nivetha at thoughtworks.com (Nivetha Padmanaban) Date: Wed, 2 Aug 2006 17:31:06 +0530 Subject: [Wtr-general] Anybody tried using database with watir scripts? Message-ID: hi, my requirement is like this - i need to execute couple of queries in different databases like, Oracle, DB2 and Teradata and i need to execute bunch of scripts based on the query results. today, i'm trying to execute simple queries against oracle database. but, i'm getting the below error again and again when i try to execute 'describe tabs' query. c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:557:in `execute': ORA-00900: invalid SQL statement (OCIError) from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:557:in `exec' from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:109:in `do_ocicall' from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:557:in `exec' from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:178:in `exec' But, i'm able to execute ('select * from all_users where username = :1', 'System') i got the above query from the web. Any clues? Regards, Nivetha. Email - nivetha at thoughtworks.com Mobile - (0) 98807 17518 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060802/a757917e/attachment.html From jfitisoff at yahoo.com Wed Aug 2 09:23:27 2006 From: jfitisoff at yahoo.com (John Fitisoff) Date: Wed, 2 Aug 2006 06:23:27 -0700 (PDT) Subject: [Wtr-general] german chars in the browser In-Reply-To: Message-ID: <20060802132327.18888.qmail@web54107.mail.yahoo.com> That looks sort of (but not quite) like UTF-8 encoding, which includes the ASCII character set. Although normally you'd see something like "\u00d9" ("\u" + a code). So it's some sort of unicode variant. For anything that doesn't fit into the ASCII range you'll see some sort of encoded value like that. Does the web site that you are testing use .properties files or some other method of externalizing the strings for localization? If so, you could probably use those strings when doing the asserts and not worry about substitution. The strings in those files would probably look something like this: STRING = Geben Sie Ihre Telefonnummer (tags\374ber --- Paul Rogers wrote: > > my web page contains "Geben Sie Ihre Telefonnummer > (tags???ber)" > In case it doesnt show correctly, near the end is a > u with 2 dots above it. Im sure there is a correct > term, but Im no linguist. > > If I do: > ie.text > I get > > => "Geben Sie Ihre Telefonnummer (tags\374ber" > > Can any one suggest a work around, solution etc? Im > sure there are other letters that will do the same > thing. > > Im thinking along the lines of > class IE > def text_with_no_escape_sequence > retun self.text.gsub("\374" , "???") > end > > and do the same for other chars. Im sure there is a > better way though. > > > Paul > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From Mark_Cain at RL.gov Wed Aug 2 10:18:00 2006 From: Mark_Cain at RL.gov (Cain, Mark) Date: Wed, 2 Aug 2006 07:18:00 -0700 Subject: [Wtr-general] german chars in the browser In-Reply-To: Message-ID: This is probably totally obvious, but did you try any of these: %q/Geben Sie Ihre Telefonn?mmer (tags ber)/ %Q!Geben Sie Ihre Telefonn?mmer (tags ber)! %Q{Geben Sie Ihre Telefonn?mmer (tags ber)} Also, make sure your font set actually has fonts for those characters. In my experience if a font set does not have a character to represent a font in a given string the system replaces it with the ?box? character. My $0.02 ;-) --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, August 01, 2006 5:11 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] german chars in the browser my web page contains "Geben Sie Ihre Telefonnummer (tags?ber)" In case it doesnt show correctly, near the end is a u with 2 dots above it. Im sure there is a correct term, but Im no linguist. If I do: ie.text I get => "Geben Sie Ihre Telefonnummer (tags\374ber" Can any one suggest a work around, solution etc? Im sure there are other letters that will do the same thing. Im thinking along the lines of class IE def text_with_no_escape_sequence retun self.text.gsub("\374" , "?") end and do the same for other chars. Im sure there is a better way though. Paul _______________________________________________ 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/20060802/4f9abc20/attachment.html From charley.baker at gmail.com Wed Aug 2 10:35:28 2006 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 2 Aug 2006 08:35:28 -0600 Subject: [Wtr-general] Anybody tried using database with watir scripts? In-Reply-To: References: Message-ID: Looks like you have an invalid SQL statement, but without knowing what your query is, we can't really help. If you're using dbi, take a look at this page: http://www.kitebird.com/articles/ruby-dbi.html Otherwise run the same query against the database through sql plus and see if it works. -Charley On 8/2/06, Nivetha Padmanaban wrote: > > > hi, > > my requirement is like this - i need to execute couple of queries in > different databases like, Oracle, DB2 and Teradata and i need to execute > bunch of scripts based on the query results. > > today, i'm trying to execute simple queries against oracle database. but, > i'm getting the below error again and again when i try to execute 'describe > tabs' query. > > c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:557:in `execute': ORA-00900: > invalid SQL statement (OCIError) > from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:557:in `exec' > from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:109:in `do_ocicall' > from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:557:in `exec' > from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:178:in `exec' > > But, i'm able to execute ('select * from all_users where username = :1', > 'System') > i got the above query from the web. > > Any clues? > > Regards, > Nivetha. > Email - nivetha at thoughtworks.com > Mobile - (0) 98807 17518 > > _______________________________________________ > 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/20060802/8a702399/attachment.html From Bill.Attebery at twtelecom.com Wed Aug 2 10:49:28 2006 From: Bill.Attebery at twtelecom.com (Attebery, Bill) Date: Wed, 2 Aug 2006 08:49:28 -0600 Subject: [Wtr-general] Attaching to windows problem In-Reply-To: Message-ID: <485A27FF1E164B4FB51E2A066D5265A503EC7A@SRVMSXMB1.ad.twtelecom.com> This is where I had issues too -- I actually changed the line to window.path != /Interent Explorer/ and had luck, although after reading closer I realized that I had misinterpreted the logic, so that wasn't really a good fix. I'd have to setup the environment again to retry -- but I seem to recall C:\WINDOWS\ also when I had similar puts in there. def self._find(how, what) ... #next unless (window.path =~ /Internet Explorer/ rescue false) next unless (window.path =~ /WINDOWS/ rescue false) # this works window.path on my machine is putting out C:\WINDOWS\ and not matching on /Internet Explorer/ The content contained in this electronic message is not intended to constitute formation of a contract binding TWTC. TWTC will be contractually bound only upon execution, by an authorized officer, of a contract including agreed terms and conditions or by express application of its tariffs. This message is intended only for the use of the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the sender of this E-Mail or by telephone. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060802/8557bf39/attachment.html From tester.paul at gmail.com Wed Aug 2 10:55:04 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 2 Aug 2006 10:55:04 -0400 Subject: [Wtr-general] Problem in accessing array element In-Reply-To: <20060802052418.43520.qmail@web7803.mail.in.yahoo.com> References: <20060802052418.43520.qmail@web7803.mail.in.yahoo.com> Message-ID: <37c405480608020755i25ba3c95o8a4e682c7e137ba2@mail.gmail.com> I had a similar problem recently when I started reading directly from Excel sheets too. The problem was that the code below creates a 3-dimensional array, not a 2-dimensional one as expected. That is, when I looked at the contents of 'data' in irb, it looked like the following: data = [[[a,1,..]], [[b,2,..]], [[c,3,..]], etc] Try adding ".flatten" to your retrieval line: data << worksheet.Range("a#{line}:u#{line}")['Value'].flatten This worked for me. Now the 'data' array will be in an expected 2-dimensional format. That is, it should now look like: data = [[a,1.0,..], [b,2.0,..], [c,3.0,..], etc] Incidentally, since this is a 2-dimensional array I don't know what you mean by 'access 3rd element'. If you want to print the 2nd value in the 3rd row, you might do something like: puts data[2][1] => 3.0 Hope this helps. Paul. On 02/08/06, VIKASH KUMAR wrote: > > Sir, > > I am storing values from excel to a array name 'data', I am using below > code for it. > > > excel = WIN32OLE::new('excel.Application') > workbook = excel.Workbooks.Open('E:\sam.xls') > worksheet = workbook.Worksheets(1) > worksheet.Select > excel['Visible'] = true > line = '2' > *data = Array.new > *while worksheet.Range("a#{line}")['Value'] > data << worksheet.Range("a#{line}:u#{line}")['Value'] > data.each { |x| print x, "\n\n\n".chomp } > puts("\n") > line.succ! > end > *Now, I wants to access 3rd element stored in the above array name 'data'. > * * I am facing problem in doing this. Please send me a solution for > this.* > > Thanks in Advance > > Vikash Kumar > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060802/4cff7922/attachment.html From faught at tejasconsulting.com Wed Aug 2 10:50:26 2006 From: faught at tejasconsulting.com (Danny R. Faught) Date: Wed, 02 Aug 2006 14:50:26 +0000 Subject: [Wtr-general] simple solution for basic authentication In-Reply-To: Message-ID: >> To productize it, I'd recommending adding a credentials method like >> Win32::IE::Mechanize uses. > >I don't understand the $realm argument in this API. Can you explain? Could >we drop it? The realm is described here - http://httpd.apache.org/docs/1.3/howto/auth.html. It corresponds to the AuthName element of the .htaccess file, and the realm is shown in the login dialog in the browser (in IE 6, it's just above the User name field). I suppose the realm can be used to designate different login accounts for different areas of a web site. For a thorough implementation, Watir should track the realm like Win32::IE::Mechanize does, which only adds a small amount of complexity. Now that I think about it, I'm not sure how the browser knows whether each new URL request is within the same realm or not. However, since the realm matching seems to occur only on the client side, a quick and dirty implementation that ignores the realm (like my sample code does) would work for the most common cases where only one login is required for a site. -Danny From bret at pettichord.com Wed Aug 2 14:30:24 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 02 Aug 2006 13:30:24 -0500 Subject: [Wtr-general] Attaching to windows problem In-Reply-To: <485A27FF1E164B4FB51E2A066D5265A503EC7A@SRVMSXMB1.ad.twtelecom.com> References: <485A27FF1E164B4FB51E2A066D5265A503EC7A@SRVMSXMB1.ad.twtelecom.com> Message-ID: <44D0EF40.8090708@pettichord.com> Bill, Marco -- Thanks for the updates. Very helpful. Attebery, Bill wrote: > This is where I had issues too -- I actually changed the line to > window.path != /Interent Explorer/ and had luck, although after > reading closer I realized that I had misinterpreted the logic, so that > wasn't really a good fix. I'd have to setup the environment again to > retry -- but I seem to recall C:\WINDOWS\ also when I had similar puts > in there. > > def self._find(how, what) > ... > #next unless (window.path =~ /Internet Explorer/ rescue false) > next unless (window.path =~ /WINDOWS/ rescue false) # this works > > window.path on my machine is putting out C:\WINDOWS\ and not > matching on /Internet Explorer/ > > > From bret at pettichord.com Wed Aug 2 15:56:23 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 2 Aug 2006 14:56:23 -0500 Subject: [Wtr-general] porting Watir to Selenium In-Reply-To: <44D043C9.6060703@reconnex.net> References: <72799cd70608011244sfdfa3exe5e6c8b3fdcc3df5@mail.gmail.com> <44D043C9.6060703@reconnex.net> Message-ID: Selenium blocks the dialogs so they never show up. This works, but is disconcerting for some since it breaks from the "tests your app just like a real user" model. Bret On 8/2/06, Manish Sapariya wrote: > > I have not used selenium, but was wondering how is the > javascript dialog support in selenium. > Does watir have upper hand there? > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060802/82312c13/attachment.html From charley.baker at gmail.com Wed Aug 2 16:27:43 2006 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 2 Aug 2006 14:27:43 -0600 Subject: [Wtr-general] Attaching to windows problem In-Reply-To: <44D0EF40.8090708@pettichord.com> References: <485A27FF1E164B4FB51E2A066D5265A503EC7A@SRVMSXMB1.ad.twtelecom.com> <44D0EF40.8090708@pettichord.com> Message-ID: Instead of pulling the window path to compare against, we should pull the windows class which for ie should be 'IEFrame', not sure if that that's changed with ie7, but will work with older versions of ie. btw, Bill, if you're posted the exact line from your scripts, then it makes sense, you've misspelled Internet Explorer, so it's looking through every window but that, which should catch your ie windows if they have different titles. -Charley On 8/2/06, Bret Pettichord wrote: > > Bill, Marco -- > > Thanks for the updates. Very helpful. > > Attebery, Bill wrote: > > This is where I had issues too -- I actually changed the line to > > window.path != /Interent Explorer/ and had luck, although after > > reading closer I realized that I had misinterpreted the logic, so that > > wasn't really a good fix. I'd have to setup the environment again to > > retry -- but I seem to recall C:\WINDOWS\ also when I had similar puts > > in there. > > > > def self._find(how, what) > > ... > > #next unless (window.path =~ /Internet Explorer/ rescue false) > > next unless (window.path =~ /WINDOWS/ rescue false) # this > works > > > > window.path on my machine is putting out C:\WINDOWS\ and not > > matching on /Internet Explorer/ > > > > > > > > _______________________________________________ > 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/20060802/35193e8d/attachment.html From Bill.Attebery at twtelecom.com Wed Aug 2 16:40:07 2006 From: Bill.Attebery at twtelecom.com (Attebery, Bill) Date: Wed, 2 Aug 2006 14:40:07 -0600 Subject: [Wtr-general] Attaching to windows problem In-Reply-To: Message-ID: <485A27FF1E164B4FB51E2A066D5265A503EC81@SRVMSXMB1.ad.twtelecom.com> Charley, No, it wasn't a cut and paste, just a typo in my post. All I did was change the =~ to !~. Sorry for the confusion. btw, Bill, if you're posted the exact line from your scripts, then it makes sense, you've misspelled Internet Explorer, so it's looking through every window but that, which should catch your ie windows if they have different titles. -Charley The content contained in this electronic message is not intended to constitute formation of a contract binding TWTC. TWTC will be contractually bound only upon execution, by an authorized officer, of a contract including agreed terms and conditions or by express application of its tariffs. This message is intended only for the use of the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the sender of this E-Mail or by telephone. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060802/20c57a25/attachment.html From welkin_inc at hotmail.com Wed Aug 2 17:08:50 2006 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Wed, 02 Aug 2006 15:08:50 -0600 Subject: [Wtr-general] How to use it in Watir? Message-ID: So, if I have an image button that does not have a name, id, or alt attribute value, but does have a src attribute value, I cannot click it? Thanks. Andrew >ie.image(:name, 'xxx').click At 08:41 AM 8/23/2005, Alex GLove wrote: Hi guys, I am trying to make watir to click on an object but with no luck. I tried both: ie.image(:src, '/Images/xxx.gif').click ie.image(:id,Your DIsco needs you').click what am I supposed to enter? many thanks _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From charley.baker at gmail.com Wed Aug 2 17:15:15 2006 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 2 Aug 2006 15:15:15 -0600 Subject: [Wtr-general] Attaching to windows problem In-Reply-To: <485A27FF1E164B4FB51E2A066D5265A503EC81@SRVMSXMB1.ad.twtelecom.com> References: <485A27FF1E164B4FB51E2A066D5265A503EC81@SRVMSXMB1.ad.twtelecom.com> Message-ID: Hey Bill, Just curious. It's still hitting anything outside of Internet Explorer in the title, makes sense if your browser is tied to c:\windows or something else, only problem is you're looping through more windows than you need to be, I'm hoping that class identification is more reliable. I'm surprised more people haven't run across this issue, it's easy to change the title in ie, a lot of isps and other custom browser installers do it. I used to change ie's title anytime I was on a new box, would've caught this if I still did. -Charley On 8/2/06, Attebery, Bill wrote: > > Charley, > No, it wasn't a cut and paste, just a typo in my post. > All I did was change the =~ to !~. > Sorry for the confusion. > > > > > > btw, Bill, if you're posted the exact line from your scripts, then it > makes sense, you've misspelled Internet Explorer, so it's looking through > every window but that, which should catch your ie windows if they have > different titles. > > -Charley > > The content contained in this electronic message is not intended to > constitute formation of a contract binding TWTC. TWTC will be > contractually bound only upon execution, by an authorized officer, of > a contract including agreed terms and conditions or by express > application of its tariffs. > > This message is intended only for the use of the individual or entity > to which it is addressed. If the reader of this message is not the > intended recipient, or the employee or agent responsible for > delivering the message to the intended recipient, you are hereby > notified that any dissemination, distribution or copying of this > message is strictly prohibited. If you have received this > communication in error, please notify us immediately by replying to > the sender of this E-Mail or by telephone. > > _______________________________________________ > 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/20060802/94d3511c/attachment.html From charley.baker at gmail.com Wed Aug 2 17:19:51 2006 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 2 Aug 2006 15:19:51 -0600 Subject: [Wtr-general] How to use it in Watir? In-Reply-To: References: Message-ID: Hey Andrew, Without seeing the html for the button you're trying to click, this is the general idea, use the src attribute and then best off for a regular expression in the source for what you're looking for. ie.image(:src, /mybutton/).click Cheers, Charley On 8/2/06, Andrew McFarlane wrote: > > So, if I have an image button that does not have a name, id, or alt > attribute value, but does have a src attribute value, I cannot click it? > > Thanks. > > Andrew > > >ie.image(:name, 'xxx').click > > At 08:41 AM 8/23/2005, Alex GLove wrote: > > Hi guys, > > > I am trying to make watir to click on an name="xxx"> > object but with no luck. > > I tried both: > ie.image(:src, '/Images/xxx.gif').click > ie.image(:id,Your DIsco needs you').click > > what am I supposed to enter? > > many thanks > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060802/2ebe0446/attachment.html From christopher.mcmahon at gmail.com Wed Aug 2 17:24:14 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 2 Aug 2006 14:24:14 -0700 Subject: [Wtr-general] How to use it in Watir? In-Reply-To: References: Message-ID: <72799cd70608021424u1056b52ar9aaf30cabf85ebbc@mail.gmail.com> On 8/2/06, Andrew McFarlane wrote: > So, if I have an image button that does not have a name, id, or alt > attribute value, but does have a src attribute value, I cannot click it? While the comments in watir.rb are not 100% accurate, they will answer a great many questions: # This is the main method for accessing images - normally an HTML tag. # * how - symbol - how we access the image, :index, :id, :name, :src, :title or :alt are supported # * what - string or regexp - what we are looking for # # returns an Image object # # Valid values for 'how' are # # :index - find the item using the index in the container (a container can be a document, a TableCell, a Span, a Div or a P # index is 1 based # :name - find the item using the name attribute # :id - find the item using the id attribute # :alt - finds the item using the alt text (tool tip) # :src - finds the item using the src tag. This must be the fully qualified name, so is best used with a regular expression # :xpath - finds the item that matches xpath query # :title - finds the item using the title (tool tip) # # Typical Usage # # ie.image(:src, /myPic/) # access the first image that matches myPic. We can use a string in place of the regular expression # # but the complete path must be used, ie.image(:src, 'http://myserver.com/my_path/my_image.jpg') # ie.image(:index,2) # access the second image on the page # ie.image(:alt, "A Picture") # access an image using the alt text # ie.image(:xpath, "//img[@alt='A Picture']/") # access an image using the alt text # From welkin_inc at hotmail.com Wed Aug 2 17:48:35 2006 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Wed, 02 Aug 2006 15:48:35 -0600 Subject: [Wtr-general] How to use it inWatir? In-Reply-To: <72799cd70608021424u1056b52ar9aaf30cabf85ebbc@mail.gmail.com> Message-ID: I am trying to click on the image: image name= id= value= al t= src=http://172.16.54.111/images/buttons/ok.gif Using irb... irb(main):007:0> browser.image(:src, 'http://172.16.54.111/images/buttons/ok.gif ').click Watir::Exception::UnknownObjectException: Unable to locate object, using src and http://172.16.54.111/images/buttons/ok.gif from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1054/./watir.rb:2267:in `assert_exists' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1054/./watir.rb:2405:in `click' from (irb):7 I also tried a regex ( /ok.gif/ ), and a different method (flash) just to see if the object would be found, but no luck. Thanks for your help. Andrew McFarlane >From: "Chris McMahon" >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] How to use it >inWatir? >Date: Wed, 2 Aug 2006 14:24:14 -0700 > >On 8/2/06, Andrew McFarlane wrote: > > So, if I have an image button that does not have a name, id, or alt > > attribute value, but does have a src attribute value, I cannot click it? > >While the comments in watir.rb are not 100% accurate, they will answer >a great many questions: > > # This is the main method for accessing images - normally an > HTML tag. > # * how - symbol - how we access the image, :index, :id, >:name, :src, :title or :alt are supported > # * what - string or regexp - what we are looking for > # > # returns an Image object > # > # Valid values for 'how' are > # > # :index - find the item using the index in the >container (a container can be a document, a TableCell, a Span, a Div >or a P > # index is 1 based > # :name - find the item using the name attribute > # :id - find the item using the id attribute > # :alt - finds the item using the alt text (tool tip) > # :src - finds the item using the src tag. This must >be the fully qualified name, so is best used with a regular expression > # :xpath - finds the item that matches xpath query > # :title - finds the item using the title (tool tip) > # > # Typical Usage > # > # ie.image(:src, /myPic/) # access the first >image that matches myPic. We can use a string in place of the regular >expression > # # but the complete >path must be used, ie.image(:src, >'http://myserver.com/my_path/my_image.jpg') > # ie.image(:index,2) # access the second >image on the page > # ie.image(:alt, "A Picture") # access an image using >the alt text > # ie.image(:xpath, "//img[@alt='A Picture']/") # access >an image using the alt text > # >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Wed Aug 2 18:07:00 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 2 Aug 2006 15:07:00 -0700 Subject: [Wtr-general] How to use it inWatir? In-Reply-To: References: <72799cd70608021424u1056b52ar9aaf30cabf85ebbc@mail.gmail.com> Message-ID: <72799cd70608021507r317652bbt5d6607935d250181@mail.gmail.com> > Watir::Exception::UnknownObjectException: Unable to locate object, using src > and > http://172.16.54.111/images/buttons/ok.gif > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1054/./watir.rb:2267:in > `assert_exists' > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1054/./watir.rb:2405:in > `click' > from (irb):7 > > I also tried a regex ( /ok.gif/ ), and a different method (flash) just to > see if the object would be found, but no luck. Now, that's a good question! Just out of curiosity, did you try browser.button(:src,'http://172.16.54.111/images/buttons/ok.gif').click ? I'm just guessing, but it's worth a try. -Chris From welkin_inc at hotmail.com Wed Aug 2 18:10:52 2006 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Wed, 02 Aug 2006 16:10:52 -0600 Subject: [Wtr-general] How to use itinWatir? In-Reply-To: <72799cd70608021507r317652bbt5d6607935d250181@mail.gmail.com> Message-ID: >Just out of curiosity, did you try > >browser.button(:src,'http://172.16.54.111/images/buttons/ok.gif').click > >? >I'm just guessing, but it's worth a try. >-Chris Just tried it. Worked. Thanks, Chris. Andrew From christopher.mcmahon at gmail.com Wed Aug 2 18:25:26 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 2 Aug 2006 15:25:26 -0700 Subject: [Wtr-general] How to use itinWatir? In-Reply-To: References: <72799cd70608021507r317652bbt5d6607935d250181@mail.gmail.com> Message-ID: <72799cd70608021525x31df298fl1a6f8aea70912665@mail.gmail.com> > > Just tried it. Worked. Thanks, Chris. > > Andrew Yay! There is a bit of ambivalence in Watir about what exactly is an image and what exactly is a button. Maybe Bret or Paul could speak more about this, but in practice I find that if one doesn't work, try the other. -Chris From browne.daniel at gmail.com Wed Aug 2 18:46:59 2006 From: browne.daniel at gmail.com (Daniel Browne) Date: Wed, 2 Aug 2006 23:46:59 +0100 Subject: [Wtr-general] Anybody tried using database with watir scripts? In-Reply-To: References: Message-ID: <79518aef0608021546n36e228b0hebdbeba1d3f71f29@mail.gmail.com> Without knowing anything about the DB interface you are using with Ruby, sometimes DB vendor-specific commands are not supported by the the DB interface. "describe " might be an example of this. If I remember correctly, you can get the same sort of information that "describe" produces by querying a system table: select COLUMN_NAME, DATA_TYPE, DATA_LENGTH, DATA_PRECISION from ALL_TAB_COLS where TABLE_NAME = '' See this link for more info on this table: http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_2093.htm#sthref1688 Cheers, Daniel. On 02/08/06, Nivetha Padmanaban wrote: > > hi, > > my requirement is like this - i need to execute couple of queries in > different databases like, Oracle, DB2 and Teradata and i need to execute > bunch of scripts based on the query results. > > today, i'm trying to execute simple queries against oracle database. but, > i'm getting the below error again and again when i try to execute 'describe > tabs' query. > > c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:557:in `execute': > ORA-00900: invalid SQL statement (OCIError) > from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:557:in > `exec' > from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:109:in > `do_ocicall' > from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:557:in > `exec' > from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:178:in > `exec' > > But, i'm able to execute ('select * from all_users where username = :1', > 'System') > i got the above query from the web. > > Any clues? > > Regards, > Nivetha. > Email - nivetha at thoughtworks.com > Mobile - (0) 98807 17518 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From christopher.mcmahon at gmail.com Wed Aug 2 19:04:13 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 2 Aug 2006 16:04:13 -0700 Subject: [Wtr-general] Anybody tried using database with watir scripts? In-Reply-To: References: Message-ID: <72799cd70608021604s16452e51m51403f3d7c23d896@mail.gmail.com> > c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:557:in `execute': > ORA-00900: invalid SQL statement (OCIError) > from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:557:in > `exec' yikes, oci8 looks scary. Consider using DBI or ODBC That'll save you tons of code maintenance, too, since you have to query multiple dbs. Say "yo" to Roy for me. -Chris From christopher.mcmahon at gmail.com Wed Aug 2 19:19:43 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 2 Aug 2006 16:19:43 -0700 Subject: [Wtr-general] AWESOME Ruby Hacks In-Reply-To: References: <000101c6b0ee$29dc3440$4dccb60a@Koko> Message-ID: <72799cd70608021619s725956e3nc22d6222ad27ed13@mail.gmail.com> > http://blog.nicksieger.com/articles/2006/04/23/tweaking-irb > > > This outlines some wonderful things about how to hack your IRB > configuration > > > file to do some totally awesome things, including And for those who didn't read Nick's blog closely, here are some more: http://wiki.rubygarden.org/Ruby/page/show/Irb/TipsAndTricks From bret at pettichord.com Thu Aug 3 03:01:50 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 3 Aug 2006 02:01:50 -0500 Subject: [Wtr-general] How to use itinWatir? In-Reply-To: <72799cd70608021525x31df298fl1a6f8aea70912665@mail.gmail.com> References: <72799cd70608021507r317652bbt5d6607935d250181@mail.gmail.com> <72799cd70608021525x31df298fl1a6f8aea70912665@mail.gmail.com> Message-ID: Sounds like we have a bug in show_images. This is yet one more reason for deprecating show_images and encouraging use of images.show instead (which doesn't have this bug). Bret On 8/2/06, Chris McMahon wrote: > > > > > Just tried it. Worked. Thanks, Chris. > > > > Andrew > > Yay! There is a bit of ambivalence in Watir about what exactly is an > image and what exactly is a button. Maybe Bret or Paul could speak > more about this, but in practice I find that if one doesn't work, try > the other. > -Chris > _______________________________________________ > 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/20060803/630cf73c/attachment.html From bret at pettichord.com Thu Aug 3 03:13:30 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 3 Aug 2006 02:13:30 -0500 Subject: [Wtr-general] simple solution for basic authentication In-Reply-To: <72799cd70607311152k2b9705c5tb917ca450b3226ce@mail.gmail.com> References: <72799cd70607311152k2b9705c5tb917ca450b3226ce@mail.gmail.com> Message-ID: Did we get any closure on this issue? Danny? Has any one else confirmed Chris's results? Bret On 7/31/06, Chris McMahon wrote: > > > This is working for a site that's a huge mess of nested frames plus a > > swarm of small js, image, and css files, etc. I noticed that you > > hardcoded the base64 encoding of the credentials. Did you try to do it > > by doing the encoding on the fly? > > Didn't try that, I didn't think it would have an effect. I'll go back > and try again. And this works on all your frames and links? My > experience was that the outer page was OK, but the credentials didn't > allow access to other aspects of the page, like frames and links. > > -Chris > _______________________________________________ > 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/20060803/1b00c14c/attachment.html From forum-watir-users at openqa.org Thu Aug 3 04:44:58 2006 From: forum-watir-users at openqa.org (dzen) Date: Thu, 03 Aug 2006 03:44:58 CDT Subject: [Wtr-general] Gathering information about how did the test passed Message-ID: <79225046.1154594740763.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi all, after some days working with ruby and watir now i have plenty of test scripts, placed in different dirs. what i need is a script that runs the others and writes the information how did the tests passed in a file. is there any one who knows how this could be done? thanks in advance dzen --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=3237&messageID=8875#8875 From Adrian.Lewis at tnt.com Thu Aug 3 07:54:42 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Thu, 3 Aug 2006 12:54:42 +0100 Subject: [Wtr-general] AWESOME Ruby Hacks In-Reply-To: <72799cd70608021619s725956e3nc22d6222ad27ed13@mail.gmail.com> Message-ID: Hi, Thanks for the links, but is it possible to syntax highlight in the IRB cmd shell through IRBC?. Can't see anything in pickaxe. Aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From forum-watir-users at openqa.org Thu Aug 3 10:42:57 2006 From: forum-watir-users at openqa.org (visweswara) Date: Thu, 03 Aug 2006 09:42:57 CDT Subject: [Wtr-general] Watir utf-8 support ( japanese support ) Message-ID: <80340219.1154616240513.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> how can we make watir support utf-8 characters?, I would like to write japanese characters in textboxes of webpages using watir. I am using watir 1.4.1 and ruby 1.8.4.20(stable) build . I tried using WIN32OLE.codepage = WIN32OLE::CP_UTF8 at the top of scipt , but no luck -- visw --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=3253&messageID=8917#8917 From christopher.mcmahon at gmail.com Thu Aug 3 11:12:41 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 3 Aug 2006 08:12:41 -0700 Subject: [Wtr-general] simple solution for basic authentication In-Reply-To: References: <72799cd70607311152k2b9705c5tb917ca450b3226ce@mail.gmail.com> Message-ID: <72799cd70608030812h330af42fnd083ede736a09a34@mail.gmail.com> On 8/3/06, Bret Pettichord wrote: > Did we get any closure on this issue? Danny? Has any one else confirmed > Chris's results? My working hypothesis is that Danny's server only has Basic Auth in place for the first outer document presented to the user, while my server has Basic Auth in place for every document on the server. Therefore the goto() hack works for Danny by accident, but I showed that goto() does not and will not emulate IE behavior when the user actually fills in a Basic Auth popup manually. The description of the behavior on my blog page still holds: http://chrismcmahonsblog.blogspot.com/2006/05/internet-explorer-basic-authorization.html So it's a nice hack to know about if you have Basic Auth in place for only one document, but it won't Do What You Mean if you stick it in Watir generally. -Chris From christopher.mcmahon at gmail.com Thu Aug 3 11:15:34 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 3 Aug 2006 08:15:34 -0700 Subject: [Wtr-general] Gathering information about how did the test passed In-Reply-To: <79225046.1154594740763.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <79225046.1154594740763.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70608030815k9b3941xe8e154937753cef9@mail.gmail.com> On 8/3/06, dzen wrote: > Hi all, > > after some days working with ruby and watir now i have plenty of test scripts, placed in different dirs. what i need is a script that runs the others and writes the information how did the tests passed in a file. is there any one who knows how this could be done? Run this code in the same directory as all of your test scripts: topdir = File.join(File.dirname(__FILE__)) Dir.chdir topdir do tests = Dir["test*"] tests.each{|x| require x} end Note that all of my test scripts are named "test_something.rb". You can probably figure out how to get the output to file yourself. From charley.baker at gmail.com Thu Aug 3 12:11:46 2006 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 3 Aug 2006 10:11:46 -0600 Subject: [Wtr-general] Watir utf-8 support ( japanese support ) In-Reply-To: <80340219.1154616240513.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <80340219.1154616240513.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Take a look at this link, you need to use the jcode library for unicode support, that being said, it'll be interesting to see if there are any issues that you might hit in Watir: http://ruphus.com/blog/2005/06/11/ruby-and-unicode/ I personally haven't had the occasion to use unicode in ruby yet., but maybe this helps. -Charley On 8/3/06, visweswara wrote: > > how can we make watir support utf-8 characters?, I would like to > write japanese characters in textboxes of webpages using watir. > > I am using watir 1.4.1 and ruby 1.8.4.20(stable) build . > I tried using > > WIN32OLE.codepage = WIN32OLE::CP_UTF8 > > at the top of scipt , but no luck > > -- > visw > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=3253&messageID=8917#8917 > _______________________________________________ > 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/20060803/a780a022/attachment.html From faught at tejasconsulting.com Thu Aug 3 12:30:00 2006 From: faught at tejasconsulting.com (Danny R. Faught) Date: Thu, 03 Aug 2006 16:30:00 +0000 Subject: [Wtr-general] Wtr-general Digest, Vol 33, Issue 7 In-Reply-To: Message-ID: >My working hypothesis is that Danny's server only has Basic Auth in >place for the first outer document presented to the user, while my >server has Basic Auth in place for every document on the server. After exploring what's going on, I think this is likely true. I believe that the server is using basic authentication to validate the user and then set a session cookie. Once the cookie is set the basic authentication is no longer required. It's a strange app. So perhaps the authentication part of the goto method does not apply recursively to the elements on the page, which means it not very useful at all. One thing I started to pursue is to find an OLE interface to set the authentication internally as if the user had already entered it. I see that even when I tell IE to save the password, it still pops up the login dialog. So it's not good enough to get it to save the password in that way - IE needs to have the password set in its memory as if the user has entered it - as you suggested. Maybe doing the GUI automation isn't such a bad solution. But let's see if IE gives us this password setting mechanism before we give up. -Danny From christopher.mcmahon at gmail.com Thu Aug 3 12:43:21 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 3 Aug 2006 09:43:21 -0700 Subject: [Wtr-general] Watir utf-8 support ( japanese support ) In-Reply-To: References: <80340219.1154616240513.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70608030943w310ac47s2de39fa3553f04a9@mail.gmail.com> Has no effect for me. Adding $KCODE = 'u' require 'jcode' and trying to send a Unicode string ?or? yields the same SOAP error I've been getting: XSD::ValueSpaceError: {http://www.w3.org/2001/XMLSchema}string: cannot accept '?or?'. On 8/3/06, Charley Baker wrote: > Take a look at this link, you need to use the jcode library for unicode > support, that being said, it'll be interesting to see if there are any > issues that you might hit in Watir: > > http://ruphus.com/blog/2005/06/11/ruby-and-unicode/ > > I personally haven't had the occasion to use unicode in ruby yet., but maybe > this helps. > > -Charley > > > On 8/3/06, visweswara wrote: > > how can we make watir support utf-8 characters?, I would like to write > japanese characters in textboxes of webpages using watir. > > > > I am using watir 1.4.1 and ruby 1.8.4.20(stable) build . > > I tried using > > > > WIN32OLE.codepage = WIN32OLE::CP_UTF8 > > > > at the top of scipt , but no luck > > > > -- > > visw > > > --------------------------------------------------------------------- > > Posted via Jive Forums > > > http://forums.openqa.org/thread.jspa?threadID=3253&messageID=8917#8917 > > _______________________________________________ > > 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 noreply at rubyforge.org Thu Aug 3 12:52:35 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 3 Aug 2006 12:52:35 -0400 (EDT) Subject: [Wtr-general] [ wtr-Feature Requests-5289 ] Asserting that a particular option is selected in a drop down Message-ID: <20060803165235.75B8AA970082@rubyforge.org> Feature Requests item #5289, was opened at 2006-08-03 12:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=5289&group_id=104 Category: General Group: None Status: Open Resolution: None Priority: 3 Submitted By: Ben Mills (benmills) Assigned to: Nobody (None) Summary: Asserting that a particular option is selected in a drop down Initial Comment: I have a situation where I'm using the querystring of the URL to preselect an option in a drop down. I want to assert the correct option is selected. It seems like the best way for me to get the selected option is: ie.select_list(:name, "thename").getSelectedItems()[0] I thought that this would return an object that would allow me to get either the text or the value of the option. However, it seems to just return the text as a string. I really want to be able to get the value of the selected option (the text could change and make the text fail, but the value is fixed). In the API documentation I noticed the Watir::OptionAccess object which allows access to both the value and the text, but I can't see any way to get this object. Maybe I'm missing something. Thanks, Ben Mills ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=5289&group_id=104 From ChintakrindiMeghana at managementdynamics.com Thu Aug 3 14:27:08 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Thu, 3 Aug 2006 14:27:08 -0400 Subject: [Wtr-general] Handling of the Mouse Over using watir Message-ID: <6CF3AA425295C7479483AC0018EDF98B06EF46E3@MI8NYCMAIL03.Mi8.com> Hi In my application the user needs to do mouseover to do some functionality For eg: In the main page one "Action" button is provided, if the user makes a mouse over the action then another menu is displayed on the right side and the user should once again should do mouse over and another menu is displayed and from that user can click Action --> First Menu is displayed -- User does one more mouse over from the previous Mneu --> Final menu -- click (Mouse over) Action --> DPS -- > Screening --> Click. How to handle this scenario ? Thanks Meghanath From Adrian.Lewis at tnt.com Thu Aug 3 14:44:54 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Thu, 3 Aug 2006 19:44:54 +0100 Subject: [Wtr-general] Handling of the Mouse Over using watir In-Reply-To: <6CF3AA425295C7479483AC0018EDF98B06EF46E3@MI8NYCMAIL03.Mi8.com> Message-ID: > In my application the user needs to do mouseover to do some functionality Can't you send a WM_MOUSEMOVE message? aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From ChintakrindiMeghana at managementdynamics.com Thu Aug 3 15:16:31 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Thu, 3 Aug 2006 15:16:31 -0400 Subject: [Wtr-general] Handling of the Mouse Over using watir Message-ID: <6CF3AA425295C7479483AC0018EDF98B06EF46E4@MI8NYCMAIL03.Mi8.com> Hi I can try that. But how to use it and what's the syntax ? Thanks Meghanath From jason_horn at insightbb.com Thu Aug 3 15:26:10 2006 From: jason_horn at insightbb.com (jason_horn at insightbb.com) Date: Thu, 03 Aug 2006 15:26:10 -0400 Subject: [Wtr-general] Named Command Line arguments Message-ID: Oh, gurus of Watir wonderment... Is there any way that I can execute a script with named command-line arguments... I am aware of the argv[] array, but am trying to implement something a little easier to get along with than that. I am almost to the point of hacking it with string manipulation using include?: if argv[0].include?('named') But I don't want to go that route if there is something better... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060803/be86e62a/attachment.html From bret at pettichord.com Thu Aug 3 15:55:24 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 03 Aug 2006 14:55:24 -0500 Subject: [Wtr-general] Handling of the Mouse Over using watir In-Reply-To: <6CF3AA425295C7479483AC0018EDF98B06EF46E3@MI8NYCMAIL03.Mi8.com> References: <6CF3AA425295C7479483AC0018EDF98B06EF46E3@MI8NYCMAIL03.Mi8.com> Message-ID: <44D254AC.1060909@pettichord.com> Try something like this: ie.cell(:text, "Action").fire_event("onmouseover") Then figure out how to access the html for the new menu, etc. Bret Chintakrindi Meghanath wrote: > In my application the user needs to do mouseover to do some functionality > > For eg: In the main page one "Action" button is provided, if the user makes a mouse over the action then another menu is displayed on the right side and the user should once again should do mouse over and another menu is displayed and from that user can click > > Action --> First Menu is displayed -- User does one more mouse over from the previous Mneu --> Final menu -- click > (Mouse over) > > Action --> DPS -- > Screening --> Click. > > How to handle this scenario ? > > Thanks > Meghanath > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Thu Aug 3 16:01:58 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 03 Aug 2006 15:01:58 -0500 Subject: [Wtr-general] simple solution for basic authentication In-Reply-To: References: Message-ID: <44D25636.4080209@pettichord.com> Thanks to Danny and Chris for the research on this topic. Danny R. Faught wrote: > Maybe doing the GUI automation isn't such a bad solution. But let's > see if IE gives us this password setting mechanism before we give up. > How would we do this? I feel like i've already done this, but i'm not quite sure if you have something specific in mind. Bret From charley.baker at gmail.com Thu Aug 3 16:10:06 2006 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 3 Aug 2006 14:10:06 -0600 Subject: [Wtr-general] Named Command Line arguments In-Reply-To: References: Message-ID: Ruby has a builtin library for command line parsing - optparse: http://www.ruby-doc.org/stdlib/libdoc/optparse/rdoc/index.html Command line processing is straight ruby not watir, will work for what you're looking for. -Charley On 8/3/06, jason_horn at insightbb.com wrote: > > Oh, gurus of Watir wonderment... > > Is there any way that I can execute a script with *named* command-line > arguments... I am aware of the argv[] array, but am trying to implement > something a little easier to get along with than that. > > I am almost to the point of hacking it with string manipulation using > include?: > > if argv[0].include?('named') > > But I don't want to go that route if there is something better... > > > _______________________________________________ > 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/20060803/331bf0b3/attachment.html From ben_simo at standardandpoors.com Thu Aug 3 16:18:40 2006 From: ben_simo at standardandpoors.com (Simo, Ben) Date: Thu, 3 Aug 2006 14:18:40 -0600 Subject: [Wtr-general] Proxy server login Message-ID: I still haven't gotten WATIR to launch the browser in a way that it displays the proxy login when required. Any ideas? Thanks, Ben -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Simo, Ben Sent: Friday, July 21, 2006 9:39 PM To: wtr-general at rubyforge.org Subject: **Caution-External**: [Wtr-general] Proxy server login I am trying to use WATIR through a proxy server. The browser is configured to automatically detect proxy settings and to use a configuration script. When manually browsing in IE, the browser displays a proxy login dialog when I attempt to access a site that is outside our network. This proxy login dialog may show up when the browser is opened, or it may show up later. When I start IE via WATIR, no proxy login dialog is displayed and IE displays the "Cannot find server" error page. How can I get WATIR to start IE so that it will detect the need to login to the proxy server, and how do I get it to log into the proxy server? Thank you, Ben -------------------------------------------------------- The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. -------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060803/aea81d0b/attachment.html From ChintakrindiMeghana at managementdynamics.com Thu Aug 3 16:29:24 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Thu, 3 Aug 2006 16:29:24 -0400 Subject: [Wtr-general] Handling of the Mouse Over using watir Message-ID: <6CF3AA425295C7479483AC0018EDF98B06EF46E7@MI8NYCMAIL03.Mi8.com> Hi Bret Yes. It worked, but I am facing one more issue. I used the following code ie.image(:src,/actions.gif/).fire_event("onMouseOver") ie.cell(:text, "DPS-LIC").fire_event("onMouseOver") ie.cell(:text,"Screening").click Action --> DPS-LIC --> Screening (click) --> DPS ---> Screening (click) Now we have different actions, but the final click has the same name "Screening",so its always performing the first one i.e DPS-LIC and I am unable to do the DPS -- Click One more thing i noticed is , the user can execute the last statement ie.cell(:text,"Screening").click without excecuting the previous statements. Thanks Meghanath From Mark_Cain at RL.gov Thu Aug 3 16:46:14 2006 From: Mark_Cain at RL.gov (Cain, Mark) Date: Thu, 3 Aug 2006 13:46:14 -0700 Subject: [Wtr-general] Proxy server login In-Reply-To: Message-ID: In IE there are several authentication settings. Open IE >> Tools >> Internet Options and click the security tab. Click the custom levels button and scroll down until you reach the User Authentication area. Most applications authenticate to the currently logged in user. Selecting that option should get rid of the proxy box. However, you should choose the appropriate one for your target user group. Hope this helps, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben Sent: Thursday, August 03, 2006 1:19 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Proxy server login I still haven't gotten WATIR to launch the browser in a way that it displays the proxy login when required. Any ideas? Thanks, Ben -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Simo, Ben Sent: Friday, July 21, 2006 9:39 PM To: wtr-general at rubyforge.org Subject: **Caution-External**: [Wtr-general] Proxy server login I am trying to use WATIR through a proxy server. The browser is configured to automatically detect proxy settings and to use a configuration script. When manually browsing in IE, the browser displays a proxy login dialog when I attempt to access a site that is outside our network. This proxy login dialog may show up when the browser is opened, or it may show up later. When I start IE via WATIR, no proxy login dialog is displayed and IE displays the "Cannot find server" error page. How can I get WATIR to start IE so that it will detect the need to login to the proxy server, and how do I get it to log into the proxy server? Thank you, Ben ________________________________ The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060803/76d9b02a/attachment.html From faught at tejasconsulting.com Thu Aug 3 16:54:46 2006 From: faught at tejasconsulting.com (Danny R. Faught) Date: Thu, 03 Aug 2006 20:54:46 +0000 Subject: [Wtr-general] simple solution for basic authentication In-Reply-To: Message-ID: >> Maybe doing the GUI automation isn't such a bad solution. But let's >> see if IE gives us this password setting mechanism before we give up. >> >How would we do this? I feel like i've already done this, but i'm not >quite sure if you have something specific in mind. You mean GUI automation? I've seen discussions on this list about a couple of different tools for generic GUI automation, including AutoIT. I haven't explored them myself, though I've heard good things about AutoIT. I have looked at Samie and saw that it has some code that uses Perl's Win32::GuiTest library to deal with this dialog, though the code in Samie that calls it needs a lot more work in order to be productized. Given the conclusion about how IE's navigate method is flawed means that the authentication in Win32::IE::Mechanize is also broken for pages that contain elements that are protected by authentication. It looks like this authentication code was copied from LWP::UserAgent, which gives the user control over each individual element because it's not a browser-based library, and thus wouldn't necessily have the problem. It still might be interesting to prove that Win32::IE::Mechanize doesn't work on Chris' site. -Danny From ben_simo at standardandpoors.com Thu Aug 3 17:06:20 2006 From: ben_simo at standardandpoors.com (Simo, Ben) Date: Thu, 3 Aug 2006 15:06:20 -0600 Subject: [Wtr-general] Proxy server login Message-ID: Thanks Mark. My problem is that I don't get a proxy login when I expect one. And because I don't get the proxy login dialog in browsers launched via WATIR, I cannot code logging into the proxy (which may be my next challenge). Also, I am unable to change the IE proxy settings as corporate security rules have locked me out of changing them in spite of being a local administrator. Ben -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark Sent: Thursday, August 03, 2006 2:46 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Proxy server login In IE there are several authentication settings. Open IE >> Tools >> Internet Options and click the security tab. Click the custom levels button and scroll down until you reach the User Authentication area. Most applications authenticate to the currently logged in user. Selecting that option should get rid of the proxy box. However, you should choose the appropriate one for your target user group. Hope this helps, --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben Sent: Thursday, August 03, 2006 1:19 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Proxy server login I still haven't gotten WATIR to launch the browser in a way that it displays the proxy login when required. Any ideas? Thanks, Ben -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Simo, Ben Sent: Friday, July 21, 2006 9:39 PM To: wtr-general at rubyforge.org Subject: **Caution-External**: [Wtr-general] Proxy server login I am trying to use WATIR through a proxy server. The browser is configured to automatically detect proxy settings and to use a configuration script. When manually browsing in IE, the browser displays a proxy login dialog when I attempt to access a site that is outside our network. This proxy login dialog may show up when the browser is opened, or it may show up later. When I start IE via WATIR, no proxy login dialog is displayed and IE displays the "Cannot find server" error page. How can I get WATIR to start IE so that it will detect the need to login to the proxy server, and how do I get it to log into the proxy server? Thank you, Ben _____ The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. _____ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060803/4a912310/attachment.html From charley.baker at gmail.com Thu Aug 3 17:29:55 2006 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 3 Aug 2006 15:29:55 -0600 Subject: [Wtr-general] Watir utf-8 support ( japanese support ) In-Reply-To: <72799cd70608030943w310ac47s2de39fa3553f04a9@mail.gmail.com> References: <80340219.1154616240513.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <72799cd70608030943w310ac47s2de39fa3553f04a9@mail.gmail.com> Message-ID: Hey Chris, Strangely ruby seems to have minimal support for unicode(since ruby was developed in Japan it's shocking that unicode support is so far behind, unicode and basic character and string handling should seem to cover utf-8 and utf-16....no dice). I only looked at a couple of pages since I thought I might have to use unicode, fortunately, I haven't. Also the soap libraries probably depend on string lengths which are different for unicode strings. That's my guess anyhow, who knows. There's also a rails plugin which is supposed to add better unicode support for rails which you might want to google. This is all guesswork on my part with some bits of information I've come across. Hopefully provides at least a path to travel down. -Charley On 8/3/06, Chris McMahon wrote: > > Has no effect for me. Adding > > > $KCODE = 'u' > require 'jcode' > > and trying to send a Unicode string > > ?or? > > yields the same SOAP error I've been getting: > > > XSD::ValueSpaceError: {http://www.w3.org/2001/XMLSchema}string: cannot > accept '?or?'. > > On 8/3/06, Charley Baker wrote: > > Take a look at this link, you need to use the jcode library for unicode > > support, that being said, it'll be interesting to see if there are any > > issues that you might hit in Watir: > > > > http://ruphus.com/blog/2005/06/11/ruby-and-unicode/ > > > > I personally haven't had the occasion to use unicode in ruby yet., but > maybe > > this helps. > > > > -Charley > > > > > > On 8/3/06, visweswara wrote: > > > how can we make watir support utf-8 characters?, I would like to write > > japanese characters in textboxes of webpages using watir. > > > > > > I am using watir 1.4.1 and ruby 1.8.4.20(stable) build . > > > I tried using > > > > > > WIN32OLE.codepage = WIN32OLE::CP_UTF8 > > > > > > at the top of scipt , but no luck > > > > > > -- > > > visw > > > > > --------------------------------------------------------------------- > > > Posted via Jive Forums > > > > > http://forums.openqa.org/thread.jspa?threadID=3253&messageID=8917#8917 > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060803/acd30b01/attachment.html From christopher.mcmahon at gmail.com Thu Aug 3 17:34:48 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 3 Aug 2006 14:34:48 -0700 Subject: [Wtr-general] simple solution for basic authentication In-Reply-To: References: Message-ID: <72799cd70608031434r354a0491y3d710e7b9cc05f14@mail.gmail.com> > Given the conclusion about how IE's navigate method is flawed means that > the authentication in Win32::IE::Mechanize is also broken for pages that > contain elements that are protected by authentication. This is not true. Mechanize authenticates fine-- Mech itself is a useragent and has nothing to do with IE. (I've got Mechanize scripts that authenticate nicely automatically every night.) The issue seems to be how Watir goes about instructing IE to handle pages protected by Basic Auth. Or else the issue is how IE does or does not handle Auth requests from drivers (NOT useragents) like Watir. I lean toward the bug-in-IE theory, but I don't have proof to back that up. Crank up a proxy like tcptrace and watch the traffic for some of these transactions. BTW, I prefer Win32::GuiTest to AutoIT, but I usually just avoid dealing with popups at all if I can help it. -Chris From tester.paul at gmail.com Thu Aug 3 19:53:38 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 3 Aug 2006 19:53:38 -0400 Subject: [Wtr-general] Handling of the Mouse Over using watir In-Reply-To: <6CF3AA425295C7479483AC0018EDF98B06EF46E7@MI8NYCMAIL03.Mi8.com> References: <6CF3AA425295C7479483AC0018EDF98B06EF46E7@MI8NYCMAIL03.Mi8.com> Message-ID: <37c405480608031653y57a7d2d1gdb3775b4349d0f70@mail.gmail.com> Try accessing the final cell with :index instead. Try it in IRB using the .flash method until you find the right index number. On 03/08/06, Chintakrindi Meghanath < ChintakrindiMeghana at managementdynamics.com> wrote:[snip] Now we have different actions, but the final click has the same name > "Screening",so > its always performing the first one i.e DPS-LIC and I am unable to do the > DPS -- Click > > One more thing i noticed is , the user can execute the last statement > ie.cell(:text,"Screening").click > without excecuting the previous statements. > > Thanks > Meghanath > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060803/85553152/attachment.html From lonny at titanez.net Thu Aug 3 21:09:52 2006 From: lonny at titanez.net (Lonny Eachus) Date: Thu, 03 Aug 2006 18:09:52 -0700 Subject: [Wtr-general] Asserting that a particular option is selected in a drop down In-Reply-To: References: Message-ID: <44D29E60.1000400@titanez.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060803/9596512b/attachment.html From forum-watir-users at openqa.org Fri Aug 4 00:04:58 2006 From: forum-watir-users at openqa.org (visweswara) Date: Thu, 03 Aug 2006 23:04:58 CDT Subject: [Wtr-general] Watir utf-8 support ( japanese support ) In-Reply-To: Message-ID: <87654792.1154664342478.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I tried with $KCODE = 'utf8' require 'jcode' , still I am not able to provide utf8 support for watir Thanks charley and chris for helping out . --- visw --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=3253&messageID=8983#8983 From faught at tejasconsulting.com Fri Aug 4 08:41:13 2006 From: faught at tejasconsulting.com (Danny R. Faught) Date: Fri, 04 Aug 2006 07:41:13 -0500 Subject: [Wtr-general] simple solution for basic authentication In-Reply-To: References: Message-ID: <44D34069.9060807@tejasconsulting.com> One person I talked to recently hypothesized that IE intentionally makes it difficult to automate the authentication dialog in order to discourage hackers from using a brute force attack to crack passwords. Seems silly now that most authentication is done within an easily automatable html form. Reminds me of the Unix passwd utility, which requires a specialized tool to automate, since it doesn't work with simple input redirection. If only with IE it were as simple as running an "expect" script. :-) -- Danny R. Faught Tejas Software Consulting http://tejasconsulting.com/ From charley.baker at gmail.com Fri Aug 4 10:44:22 2006 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 4 Aug 2006 08:44:22 -0600 Subject: [Wtr-general] Watir utf-8 support ( japanese support ) In-Reply-To: <87654792.1154664342478.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <87654792.1154664342478.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: You might also try running ruby with the -Ku option( i.e. ruby -Ku mytest.rb), if you run ruby --help you'll see it listed as an option to ruby for running Kanji code-set. Sorry I couldn't be of more help, I only briefly took a look at some information on it a while back thinking I might have to use it as well, but haven't had to yet. You might try searching through and/or posting on the comp.lang.ruby newsgroup. I'd be interested to hear what you find if you can figure it out. Good luck, Charley On 8/3/06, visweswara wrote: > > I tried with > > $KCODE = 'utf8' > require 'jcode' , still I am not able to provide utf8 support for watir > > Thanks charley and chris for helping out . > > --- > visw > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=3253&messageID=8983#8983 > _______________________________________________ > 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/20060804/9ae6525d/attachment.html From christopher.mcmahon at gmail.com Fri Aug 4 11:34:09 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 4 Aug 2006 08:34:09 -0700 Subject: [Wtr-general] simple solution for basic authentication In-Reply-To: <44D34069.9060807@tejasconsulting.com> References: <44D34069.9060807@tejasconsulting.com> Message-ID: <72799cd70608040834o4eea450ci4c31bf40d7400238@mail.gmail.com> On 8/4/06, Danny R. Faught wrote: > One person I talked to recently hypothesized that IE intentionally makes it difficult to automate the authentication dialog in order to discourage hackers from using a brute force attack to crack passwords. Seems silly now that most authentication is done within an easily automatable html form. Basic Authentication isn't really about security, though. The user/pass are trivially encrypted and very easy to sniff. It's more of a "are you sure you need to be here" gateway. -Chris From christopher.mcmahon at gmail.com Fri Aug 4 11:36:01 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 4 Aug 2006 08:36:01 -0700 Subject: [Wtr-general] Watir utf-8 support ( japanese support ) In-Reply-To: References: <87654792.1154664342478.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70608040836q4e01428fv69d465943a7ce69c@mail.gmail.com> Just BTW, I was sniffing my HTTP traffic for other reasons, and Ruby soap4r seems to actually set "Encoding=utf-8" in the HTTP headers, but wigs when it actually sees any UTF8. -Chris On 8/4/06, Charley Baker wrote: > You might also try running ruby with the -Ku option( i.e. ruby -Ku > mytest.rb), if you run ruby --help you'll see it listed as an option to ruby > for running Kanji code-set. > > Sorry I couldn't be of more help, I only briefly took a look at some > information on it a while back thinking I might have to use it as well, but > haven't had to yet. You might try searching through and/or posting on the > comp.lang.ruby newsgroup. I'd be interested to hear what you find if you can > figure it out. > > Good luck, > Charley > > > On 8/3/06, visweswara < forum-watir-users at openqa.org> wrote: > > I tried with > > > > $KCODE = 'utf8' > > require 'jcode' , still I am not able to provide utf8 support for watir > > > > Thanks charley and chris for helping out . > > > > --- > > visw > > > --------------------------------------------------------------------- > > Posted via Jive Forums > > > http://forums.openqa.org/thread.jspa?threadID=3253&messageID=8983#8983 > > _______________________________________________ > > 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 bret at pettichord.com Fri Aug 4 15:00:55 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 04 Aug 2006 14:00:55 -0500 Subject: [Wtr-general] simple solution for basic authentication In-Reply-To: <72799cd70608031434r354a0491y3d710e7b9cc05f14@mail.gmail.com> References: <72799cd70608031434r354a0491y3d710e7b9cc05f14@mail.gmail.com> Message-ID: <44D39967.9020202@pettichord.com> Chris McMahon wrote: >> Given the conclusion about how IE's navigate method is flawed means that >> the authentication in Win32::IE::Mechanize is also broken for pages that >> contain elements that are protected by authentication. >> > > This is not true. Mechanize authenticates fine-- Mech itself is a > useragent and has nothing to do with IE. (I've got Mechanize scripts > that authenticate nicely automatically every night.) > I think we have some crossed wires here. One person is talking about IE::Mechanize (a browser driver, like Watir) and the other is talking about Mechanize (a protocol driver). From bret at pettichord.com Fri Aug 4 15:06:00 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 04 Aug 2006 14:06:00 -0500 Subject: [Wtr-general] simple solution for basic authentication In-Reply-To: References: Message-ID: <44D39A98.3060402@pettichord.com> Danny R. Faught wrote: >>> Maybe doing the GUI automation isn't such a bad solution. But let's >>> see if IE gives us this password setting mechanism before we give up. >>> >>> >> How would we do this? I feel like i've already done this, but i'm not >> quite sure if you have something specific in mind. >> > > You mean GUI automation? No. What i meant was i thought we'd already investigated whether IE gives us a decent password setting mechanism. (It seems like it doesn't.) I agree that Watir lacks a reliable solution to the general problem. It seems like we will have to go with way of directly handling the password pop ups. > It still might be interesting to prove that Win32::IE::Mechanize > doesn't work on Chris' site. > This was what i was digging to get from you (Namely a specific request for what additional research you wanted to see). I agree that this would be interesting. Bret From christopher.mcmahon at gmail.com Fri Aug 4 15:19:26 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 4 Aug 2006 12:19:26 -0700 Subject: [Wtr-general] simple solution for basic authentication In-Reply-To: <44D39A98.3060402@pettichord.com> References: <44D39A98.3060402@pettichord.com> Message-ID: <72799cd70608041219p1ab47c7dx1ce4fbdb9b88049f@mail.gmail.com> > > It still might be interesting to prove that Win32::IE::Mechanize > > doesn't work on Chris' site. > > > This was what i was digging to get from you (Namely a specific request > for what additional research you wanted to see). I agree that this would > be interesting. I misunderstood. I did indeed read WWW::Mechanize for IE::Mechanize. -Chris From bret at pettichord.com Fri Aug 4 17:04:51 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 04 Aug 2006 16:04:51 -0500 Subject: [Wtr-general] AWESOME Ruby Hacks In-Reply-To: References: Message-ID: <44D3B673.5030806@pettichord.com> > is it possible to syntax highlight in the IRB cmd > shell through IRBC?. Can't see anything in pickaxe. > > Aidy > Not to my knowledge. I suspect that we'll see this first in one of the Ruby IDE's like Arachno or, probably TextMate (which only works on a Mac). Bret From vikashkumar051 at yahoo.co.in Sat Aug 5 06:20:03 2006 From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR) Date: Sat, 5 Aug 2006 11:20:03 +0100 (BST) Subject: [Wtr-general] problem in opening a file In-Reply-To: Message-ID: <20060805102003.97080.qmail@web7813.mail.in.yahoo.com> I am loading a file by giving the absolute path, the below code works fine: excel = WIN32OLE::new('excel.Application') workbook = excel.Workbooks.Open('C:\demo\mation.xls') worksheet = workbook.Worksheets(1) worksheet.Select excel['Visible'] = true I want to use the name of the file to open 'mation.xls', not the entire path 'C:\demo\mation.xls'. Please send me a solution for this. Thanks in advance Vikash Kumar --------------------------------- Here?s a new way to find what you're looking for - Yahoo! Answers -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060805/570ca20b/attachment.html From vikashkumar051 at yahoo.co.in Sat Aug 5 07:40:06 2006 From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR) Date: Sat, 5 Aug 2006 12:40:06 +0100 (BST) Subject: [Wtr-general] Facing difficulty in click event of menus In-Reply-To: Message-ID: <20060805114006.24156.qmail@web7813.mail.in.yahoo.com> I am using below html code in my page, I want to flash on "View Transaction", "View Trade", "Rating" and after that click on it, how to do this please send me a solution for this.