From alex at verk.info Sat Oct 1 08:05:23 2005 From: alex at verk.info (Alexey Verkhovsky) Date: Sat, 01 Oct 2005 06:05:23 -0600 Subject: [Wtr-general] Please help to get the item id In-Reply-To: <20050930090206.46400.qmail@web35712.mail.mud.yahoo.com> References: <20050930090206.46400.qmail@web35712.mail.mud.yahoo.com> Message-ID: <433E7B83.7090300@verk.info> Max Kononovich wrote: > Is anybody know how to get digital id having the string > "http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" > I mean that I need for "14". It is very important for me. Please help. RTFM about regular expressions - they are your best friend for tasks like this. irb:001:0> s = "http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" => "http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" irb:002:0> i = s.gsub(/^http:.*\?menu_id=(\d+)$/, '\1') => "14" --- Alexey Verkhovsky From jeff.darklight at gmail.com Sat Oct 1 09:15:07 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Sat, 1 Oct 2005 06:15:07 -0700 Subject: [Wtr-general] Please help to get the item id In-Reply-To: <433E7B83.7090300@verk.info> References: <20050930090206.46400.qmail@web35712.mail.mud.yahoo.com> <433E7B83.7090300@verk.info> Message-ID: I hope I'm speaking for others on this list, but jumping on somebody with an RTFM answer is extremely inappropriate. You can simply suggest they pick up either a copy of Ruby in a Nutshell ( by Matz ) ... or Programming Ruby 2nd Ed ( by Dave Thomas ). It is completely agreed that there are many ways the OPer could have found the information, but they came here for help, not to get cussed at. It'd be a real turn off to me if I were still green @ this if people responded to my questions like that. Anyways, like I said, I *hope* I was responding appropriately in this. If not, somebody will bite me for overstepping. j. On 10/1/05, Alexey Verkhovsky wrote: > > Max Kononovich wrote: > > > Is anybody know how to get digital id having the string > > "http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" > > I mean that I need for "14". It is very important for me. Please help. > > RTFM about regular expressions - they are your best friend for tasks > like this. > > irb:001:0> s = "http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" > => "http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" > irb:002:0> i = s.gsub(/^http:.*\?menu_id=(\d+)$/, '\1') > => "14" > > --- > Alexey Verkhovsky > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "http://ruby-lang.org -- do you ruby?" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051001/7654d614/attachment.html From pgillogley at optusnet.com.au Sat Oct 1 11:29:54 2005 From: pgillogley at optusnet.com.au (Peter) Date: Sun, 2 Oct 2005 01:29:54 +1000 Subject: [Wtr-general] Accessing Frames that show --Access Denied- Message-ID: <000601c5c69c$f934ebc0$0200a8c0@Study4700> Hi, I am using WATIR to test a web application and have hit some problems. I have reproduced the issue with an external website. My questions are: 1. Can I safely ignore the "frame error in waitdocument" (it was been the topic of previous threads) [I get this error on both my internal website that I am testing as well as this external website]. 2. How do I access frames (show_objects, click link etc) that return "--Access Denied-". * I am able to see the HTML on the screen (by right button view source) * "ie.show_frames " shows one of the frames as ""--Access Denied-". * The second frame does not seem to appear in a "show_all_objects" * Attempting to access the second frame via index results in an error `method_missing': document (WIN32OLERuntimeError) * I have verified that the same commands work for Frame 1 (which does not report access denied) Code and run output are below My code ftest.rb ============================================ require 'thread' require 'watir' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' include Watir testsite = 'http://computer.howstuffworks.com/framed.htm?parent=web-page.htm&url=http:/ /www.aquarium.ucsd.edu' puts "Go to site" $ie = IE.new $ie.goto(testsite) puts "Display the frames" $ie.show_frames puts "Display all objetcs" $ie.show_all_objects puts "Now get at the objects in frame 2" $ie.frame(:index, 2).links.show # Click on the Simulator Ride link # $ie.frame(:index, 1).link(:text, "Simulator Ride").click # $ie.frame(:index, 1).show_all_objects # $ie.frame(:index, 2).show_all_objects ============================================================================ = D:\Documents\Testing\WAITR>ftest.rb Go to site W, [01-Oct-2005 11:14:33#1984] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `method_missing' d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `wait' d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `upto' d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `wait' d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1254:in `goto' D:/Documents/Testing/WAITR/ftest.rb:11 Display the frames there are 2 frames frame index: 1 name: _heading frame index: 2 --Access Denied-- Display all objetcs -----------Objects in page ------------- HTML Document name=_heading id= src=frame_heading.htm? parent=&url=http%3A%2F%2Fwww.aquarium.ucsd.edu Now get at the objects in frame 2 d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1740:in `method_missing': document (WIN3 2OLERuntimeError) OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. from d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:174 0:in `document' from d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:762:in `getContainer' from d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3488:in `length' from d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2077:in `initialize' from d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:582:in `new' from d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:582:in `links' from D:/Documents/Testing/WAITR/ftest.rb:22 D:\Documents\Testing\WAITR> Peter Gillogley http://www.gillogley.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051002/a3bec99b/attachment.html From jkohl at telusplanet.net Sat Oct 1 12:02:39 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Sat, 1 Oct 2005 10:02:39 -0600 Subject: [Wtr-general] Please help to get the item id In-Reply-To: Message-ID: <001301c5c6a1$8c918af0$6500a8c0@tintin> > I hope I'm speaking for others on this list, but jumping on > somebody with an RTFM answer is extremely inappropriate. +1 From Sean.Gallagher at ticketmaster.com Sat Oct 1 14:21:43 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Sat, 1 Oct 2005 11:21:43 -0700 Subject: [Wtr-general] Please help to get the item id Message-ID: <71D28C8451BFD5119B2B00508BE26E6409E11B9B@pasmail3.office.tmcs> I agree. Thanks for speaking up. -sean _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: Saturday, October 01, 2005 6:15 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Please help to get the item id I hope I'm speaking for others on this list, but jumping on somebody with an RTFM answer is extremely inappropriate. You can simply suggest they pick up either a copy of Ruby in a Nutshell ( by Matz ) ... or Programming Ruby 2nd Ed ( by Dave Thomas ). It is completely agreed that there are many ways the OPer could have found the information, but they came here for help, not to get cussed at. It'd be a real turn off to me if I were still green @ this if people responded to my questions like that. Anyways, like I said, I *hope* I was responding appropriately in this. If not, somebody will bite me for overstepping. j. On 10/1/05, Alexey Verkhovsky > wrote: Max Kononovich wrote: > Is anybody know how to get digital id having the string > " http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" > I mean that I need for "14". It is very important for me. Please help. RTFM about regular expressions - they are your best friend for tasks like this. irb:001:0> s = "http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14 " => " http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" irb:002:0> i = s.gsub(/^http:.*\?menu_id=(\d+)$/, '\1') => "14" --- Alexey Verkhovsky _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- "http://ruby-lang.org -- do you ruby?" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051001/5cb9b514/attachment.html From alex at verk.info Sat Oct 1 17:01:10 2005 From: alex at verk.info (Alexey Verkhovsky) Date: Sat, 01 Oct 2005 15:01:10 -0600 Subject: [Wtr-general] Please help to get the item id In-Reply-To: <71D28C8451BFD5119B2B00508BE26E6409E11B9B@pasmail3.office.tmcs> References: <71D28C8451BFD5119B2B00508BE26E6409E11B9B@pasmail3.office.tmcs> Message-ID: <433EF916.5080906@verk.info> Sorry, the RTFM abbreviation wasn't meant to be anything like you imagine. Just a suggestion where to look for a generic solution to this class of problems. The quote from IRB session quote was a specific solution to the question posed. Alex > I hope I'm speaking for others on this list, but jumping on somebody > with an RTFM answer is extremely inappropriate. > On 10/1/05, *Alexey Verkhovsky* > wrote: > > RTFM about regular expressions - they are your best friend for tasks > like this. > > irb:001:0> s = > "http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" > => " http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" > irb:002:0> i = s.gsub(/^http:.*\?menu_id=(\d+)$/, '\1') > => "14" > From jeff.darklight at gmail.com Sat Oct 1 21:23:37 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Sat, 1 Oct 2005 17:23:37 -0800 Subject: [Wtr-general] Please help to get the item id In-Reply-To: <433EF916.5080906@verk.info> References: <71D28C8451BFD5119B2B00508BE26E6409E11B9B@pasmail3.office.tmcs> <433EF916.5080906@verk.info> Message-ID: The 'F' in RTFM has ALWAYS had derogatory meaning since the inception of the acronym. http://www.pmms.cam.ac.uk/~gjm11/jargon/jargR.html#rtfm And, yes, I saw that you had included irb lines within your post, but, people come here for help... They want solutions spelled out, because ( hopefully ) they've already done all of the research they could, and just didn't understand, or couldn't find the right docs in the first place... If you had simply changed your town from RTFM!!!! to "there are a number of good online references for regular expressions like : ( enumerate urls ) ... as well as the wonderful O'Reilly book "Mastering Regular Expressions" ... Here's a solution, and it does look a bit like line-noise, so if you'd like to understand it better, any of these resources should help." Much calmer, much nicer, and an easier way to grow the community. Anyways, ciao for now. j. On 10/1/05, Alexey Verkhovsky wrote: > Sorry, the RTFM abbreviation wasn't meant to be anything like you > imagine. Just a suggestion where to look for a generic solution to this > class of problems. > The quote from IRB session quote was a specific solution to the question > posed. > > Alex > > > I hope I'm speaking for others on this list, but jumping on somebody > > with an RTFM answer is extremely inappropriate. > > On 10/1/05, *Alexey Verkhovsky* > > wrote: > > > > RTFM about regular expressions - they are your best friend for tasks > > like this. > > > > irb:001:0> s = > > "http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" > > => " http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" > > irb:002:0> i = s.gsub(/^http:.*\?menu_id=(\d+)$/, '\1') > > => "14" > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "http://ruby-lang.org -- do you ruby?" Jeff Wood From jeff.darklight at gmail.com Sat Oct 1 21:24:15 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Sat, 1 Oct 2005 17:24:15 -0800 Subject: [Wtr-general] Please help to get the item id In-Reply-To: References: <71D28C8451BFD5119B2B00508BE26E6409E11B9B@pasmail3.office.tmcs> <433EF916.5080906@verk.info> Message-ID: Erg .... last_message.gsub( "your town", "your tone" ).repost j. On 10/1/05, Jeff Wood wrote: > The 'F' in RTFM has ALWAYS had derogatory meaning since the inception > of the acronym. > > http://www.pmms.cam.ac.uk/~gjm11/jargon/jargR.html#rtfm > > And, yes, I saw that you had included irb lines within your post, but, > people come here for help... They want solutions spelled out, because > ( hopefully ) they've already done all of the research they could, and > just didn't understand, or couldn't find the right docs in the first > place... > > If you had simply changed your town from RTFM!!!! to "there are a > number of good online references for regular expressions like : ( > enumerate urls ) ... as well as the wonderful O'Reilly book "Mastering > Regular Expressions" ... Here's a solution, and it does look a bit > like line-noise, so if you'd like to understand it better, any of > these resources should help." > > Much calmer, much nicer, and an easier way to grow the community. > > Anyways, ciao for now. > > j. > > On 10/1/05, Alexey Verkhovsky wrote: > > Sorry, the RTFM abbreviation wasn't meant to be anything like you > > imagine. Just a suggestion where to look for a generic solution to this > > class of problems. > > The quote from IRB session quote was a specific solution to the question > > posed. > > > > Alex > > > > > I hope I'm speaking for others on this list, but jumping on somebody > > > with an RTFM answer is extremely inappropriate. > > > On 10/1/05, *Alexey Verkhovsky* > > > wrote: > > > > > > RTFM about regular expressions - they are your best friend for > tasks > > > like this. > > > > > > irb:001:0> s = > > > "http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" > > > => " http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" > > > irb:002:0> i = s.gsub(/^http:.*\?menu_id=(\d+)$/, '\1') > > > => "14" > > > > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > -- > "http://ruby-lang.org -- do you ruby?" > > Jeff Wood > -- "http://ruby-lang.org -- do you ruby?" Jeff Wood From ati.ozgur at gmail.com Sun Oct 2 12:21:20 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Sun, 2 Oct 2005 19:21:20 +0300 Subject: [Wtr-general] How to use the log4r.rb In-Reply-To: <20050930104949.8602.qmail@web35704.mail.mud.yahoo.com> References: <20050930104949.8602.qmail@web35704.mail.mud.yahoo.com> Message-ID: Did you try samples which comes with one click installer, in mymachine they are in the folder.C:\ruby\samples\log4r-1.0.5\examplesC:\ruby\samples\log4r-1.0.5\examples\logs As I know log4r is already installed with one click installer, you donot need to download it from sourceforge. Try these examples. Theywork. But you have to create directory there.After that examples writesimple.log etc files to them, or console output. On 9/30/05, Max Kononovich wrote:> Hello,>> Please, tell me how to use log4r.rb for writting logs into file. The> example on site http://log4r.sourceforge.net/ doesn't work.>> Thanks,>> Max>> ________________________________> ?? ??? ? Yahoo!?> ????????? ??????????? ? ?????????? Yahoo! ?????!>>> _______________________________________________> Wtr-general mailing list> Wtr-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/wtr-general>>> From kononovichma at yahoo.com Mon Oct 3 14:27:39 2005 From: kononovichma at yahoo.com (Max Kononovich) Date: Mon, 3 Oct 2005 22:27:39 +0400 (MSD) Subject: [Wtr-general] Buttons on the confirmation message In-Reply-To: Message-ID: <20051003182739.90682.qmail@web35708.mail.mud.yahoo.com> Hello I'll try the algorithm below. But it seems that nohig happens. I mean the comfirmation message appeares however $helper doesn't click on the button. Please, tell if you know the solution. Thanks, Max > Hi Max, > > Try this out like this: > > # This you should write in the script > Thread.new { system("rubyw myclicker.rb") } > $ie.link(:url, /menu_delete/).click > > Now create a new file called myclicker.rb > require 'watir/WindowHelper' > $helper = WindowHelper.new > $helper.push_confirm_button_ok() > > Hope this helps, > > P.S.: You can change the name of the file from > myclicker.rb but make sure > both the names are same (the names shown in bold > text). > > Regards, > Angrez ________________________________________________________ ?? ??? ? Yahoo!? ????????? ??????????? ? ??????????. Yahoo! ?????! http://ru.mail.yahoo.com From alf at klickit.com Mon Oct 3 14:31:51 2005 From: alf at klickit.com (Alfred Whitehead) Date: Mon, 03 Oct 2005 14:31:51 -0400 Subject: [Wtr-general] Buttons on the confirmation message In-Reply-To: <20051003182739.90682.qmail@web35708.mail.mud.yahoo.com> References: <20051003182739.90682.qmail@web35708.mail.mud.yahoo.com> Message-ID: <43417917.4060107@klickit.com> Hi Max, I have played with something similar to this in the past. I found that, when linked up to IE, the whole process that your script is running in will become blocked when a Javascript pop-up appears. This seems to affect all threads that are part of that process. One possible solution would be to spawn a separate process to run myclicker.rb. There may well be a better solution (and I would enjoy seeing it too!). Alf Max Kononovich wrote: >Hello > >I'll try the algorithm below. But it seems that nohig >happens. I mean the comfirmation message appeares >however $helper doesn't click on the button. Please, >tell if you know the solution. > >Thanks, > >Max > > > >>Hi Max, >> >>Try this out like this: >> >># This you should write in the script >>Thread.new { system("rubyw myclicker.rb") } >>$ie.link(:url, /menu_delete/).click >> >>Now create a new file called myclicker.rb >>require 'watir/WindowHelper' >>$helper = WindowHelper.new >>$helper.push_confirm_button_ok() >> >>Hope this helps, >> >>P.S.: You can change the name of the file from >>myclicker.rb but make sure >>both the names are same (the names shown in bold >>text). >> >>Regards, >>Angrez >> >> > > > > > > > >________________________________________________________ >?? ??? ? Yahoo!? >????????? ??????????? ? ??????????. Yahoo! ?????! http://ru.mail.yahoo.com >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > -- Alf Whitehead [alf at klickit.com] 416-214-4977 x260 Quality Assurance Specialist Klick Communications, http://klick.com/ From christopher.mcmahon at gmail.com Mon Oct 3 18:32:57 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 3 Oct 2005 17:32:57 -0500 Subject: [Wtr-general] OT: generate random text? Message-ID: <72799cd70510031532j6bbec89bn99f1d095c63a83d0@mail.gmail.com> Hi... I want to generate some random text for test purposes. "rand" doesn't seem to DWIM. Say, to pick an arbitrary letter from the uppercase range A to Z. [A-Z].rand [A..Z].rand seems right, but isn't. -Chris From jeff.darklight at gmail.com Mon Oct 3 18:48:00 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 3 Oct 2005 15:48:00 -0700 Subject: [Wtr-general] OT: generate random text? In-Reply-To: <72799cd70510031532j6bbec89bn99f1d095c63a83d0@mail.gmail.com> References: <72799cd70510031532j6bbec89bn99f1d095c63a83d0@mail.gmail.com> Message-ID: Use a function like: def random_text( length ) output = "" length.times do output << ('A'..'Z').to_a[ rand(26) ] end output end then, where ever you need it : just call it random_text( 42 ) # for 42 chars of random text ... j. On 10/3/05, Chris McMahon wrote: > > Hi... > > I want to generate some random text for test purposes. "rand" doesn't > seem to DWIM. Say, to pick an arbitrary letter from the uppercase > range A to Z. > > [A-Z].rand > [A..Z].rand > > seems right, but isn't. > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "http://ruby-lang.org -- do you ruby?" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051003/6959df32/attachment.html From christopher.mcmahon at gmail.com Mon Oct 3 18:57:41 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 3 Oct 2005 17:57:41 -0500 Subject: [Wtr-general] OT: generate random text? In-Reply-To: References: <72799cd70510031532j6bbec89bn99f1d095c63a83d0@mail.gmail.com> Message-ID: <72799cd70510031557u73b19baescf6a1c97eef1bfe8@mail.gmail.com> > then, where ever you need it : just call it > > random_text( 42 ) # for 42 chars of random text ... Neato! Thanks! -Chris From winstonp at BATTELLE.ORG Tue Oct 4 08:21:30 2005 From: winstonp at BATTELLE.ORG (Winston, Phyllis H) Date: Tue, 04 Oct 2005 08:21:30 -0400 Subject: [Wtr-general] OT: generate random text? Message-ID: <55DDFCF3AB9E5E4A8488FF30D1AA1A249957F6@WS-CP-MSE1.milky-way.battelle.org> Alan Richardson has an excel spreadsheet using visual basic macros for data generation: http://www.compendiumdev.co.uk/testdata/index.php -----Original Message----- From: Chris McMahon [mailto:christopher.mcmahon at gmail.com] Sent: Monday, October 03, 2005 6:33 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] OT: generate random text? Hi... I want to generate some random text for test purposes. "rand" doesn't seem to DWIM. Say, to pick an arbitrary letter from the uppercase range A to Z. [A-Z].rand [A..Z].rand seems right, but isn't. -Chris From padraigoleary at gmail.com Tue Oct 4 11:49:05 2005 From: padraigoleary at gmail.com (Padraig O'Leary) Date: Tue, 4 Oct 2005 16:49:05 +0100 Subject: [Wtr-general] Problems with XPath extension Message-ID: <3b4e13d10510040849h2e01904aj7259595a06b76d06@mail.gmail.com> Hi, I extended Watir Ver. 1.4.1 with the Xpath extension. However I'm having problems with the Xpath extension. It has problems identifying nodes using the text they contain. For example a node with:
some text
Xpath will have trouble finding the DIV tag using the text it contains. If I put the following code in (:xpath, "//div['some totally different text']") It would find the above node. See the example below:
bbb
yyy
If I use this Xpath (:xpath, "//div[@id='div2']/*/.='blah blah'") it'll fine the node
bbb
. It finds the first element without looking at the end of the XPath statement. You cant search for an node based on the text it contains! Will Watir Ver. 1.5 contain the same Xpath version that's now available in Head in CVS or is to plan to modify. Should I wait to see if the new version will fix this problem or go the awkward route of trying to change the way the tag elements are generated? Has anybody else come across the same problems? Thanks a million P?draig -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051004/0b71f325/attachment.html From jeff.darklight at gmail.com Tue Oct 4 12:36:26 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 4 Oct 2005 09:36:26 -0700 Subject: [Wtr-general] Problems with XPath extension In-Reply-To: <3b4e13d10510040849h2e01904aj7259595a06b76d06@mail.gmail.com> References: <3b4e13d10510040849h2e01904aj7259595a06b76d06@mail.gmail.com> Message-ID: Ok ... I'm trying to figure out what specifically you NEED/WANT this for ??? What is the point of going after the DIV tag if you already know the text inside it ? ... Just my question ... I'm trying to see practical use. I can see use for finding a tag based on id's &| attributes, sorry, guess I'm a little dense. j. On 10/4/05, Padraig O'Leary wrote: > > Hi, > > I extended Watir Ver. 1.4.1 with the Xpath extension. However I'm having > problems with the Xpath extension. It has problems identifying nodes using > the text they contain. For example a node with: > >
some text
> Xpath will have trouble finding the DIV tag using the text it contains. If > I put the following code in (:xpath, "//div['some totally different text']") > > > It would find the above node. See the example below: > >
>
bbb
> > >
>
yyy
>
> > If I use this Xpath (:xpath, "//div[@id='div2']/*/.='blah blah'") it'll > fine the node
bbb
. It finds the first element > without looking at the end of the XPath statement. > > You cant search for an node based on the text it contains! Will Watir Ver. > 1.5 contain the same Xpath version that's now available in Head in CVS or > is to plan to modify. Should I wait to see if the new version will fix this > problem or go the awkward route of trying to change the way the tag elements > are generated? Has anybody else come across the same problems? > > Thanks a million > P?draig > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "http://ruby-lang.org -- do you ruby?" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051004/3703e78c/attachment.html From kononovichma at yahoo.com Tue Oct 4 12:39:58 2005 From: kononovichma at yahoo.com (Max Kononovich) Date: Tue, 4 Oct 2005 20:39:58 +0400 (MSD) Subject: [Wtr-general] How to click on the confirmation button In-Reply-To: Message-ID: <20051004163958.36258.qmail@web35708.mail.mud.yahoo.com> Hello, Please, tell how I can start the separete process? Thanks, Max Message: 8 Date: Mon, 03 Oct 2005 14:31:51 -0400 From: Alfred Whitehead Subject: Re: [Wtr-general] Buttons on the confirmation message To: wtr-general at rubyforge.org Message-ID: <43417917.4060107 at klickit.com> Content-Type: text/plain; charset=KOI8-R; format=flowed Hi Max, I have played with something similar to this in the past. I found that, when linked up to IE, the whole process that your script is running in will become blocked when a Javascript pop-up appears. This seems to affect all threads that are part of that process. One possible solution would be to spawn a separate process to run myclicker.rb. There may well be a better solution (and I would enjoy seeing it too!). Alf Max Kononovich wrote: >Hello > >I'll try the algorithm below. But it seems that nohig >happens. I mean the comfirmation message appeares >however $helper doesn't click on the button. Please, >tell if you know the solution. > >Thanks, > >Max > > > >>Hi Max, >> >>Try this out like this: >> >># This you should write in the script >>Thread.new { system("rubyw myclicker.rb") } >>$ie.link(:url, /menu_delete/).click >> >>Now create a new file called myclicker.rb >>require 'watir/WindowHelper' >>$helper = WindowHelper.new >>$helper.push_confirm_button_ok() >> >>Hope this helps, >> >>P.S.: You can change the name of the file from >>myclicker.rb but make sure >>both the names are same (the names shown in bold >>text). >> >>Regards, >>Angrez >> >> > > > > > > > >________________________________________________________ >?? ??? ? Yahoo!? >????????? ??????????? ? ??????????. Yahoo! ?????! http://ru.mail.yahoo.com >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > -- Alf Whitehead [alf at klickit.com] 416-214-4977 x260 Quality Assurance Specialist Klick Communications, http://klick.com/ ------------------------------ Message: 9 Date: Mon, 3 Oct 2005 17:32:57 -0500 From: Chris McMahon Subject: [Wtr-general] OT: generate random text? To: wtr-general at rubyforge.org Message-ID: <72799cd70510031532j6bbec89bn99f1d095c63a83d0 at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Hi... I want to generate some random text for test purposes. "rand" doesn't seem to DWIM. Say, to pick an arbitrary letter from the uppercase range A to Z. [A-Z].rand [A..Z].rand seems right, but isn't. -Chris ------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general End of Wtr-general Digest, Vol 23, Issue 2 ****************************************** Вы уже с Yahoo!? Испытайте обновленную и улучшенную Yahoo! Почту! http://ru.mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051004/9a088054/attachment.html From noreply at rubyforge.org Tue Oct 4 13:21:02 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 4 Oct 2005 13:21:02 -0400 Subject: [Wtr-general] [ wtr-Support Requests-2574 ] Need file access by URL instead of actual path Message-ID: <200510041721.j94HL2FY027055@rubyforge.org> Support Requests item #2574, was opened at 2005-10-04 13:21 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=488&aid=2574&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: Need file access by URL instead of actual path Initial Comment: Is there a way to access files using the URL, instead of the actual OS path? I want to muck with my web app's config settings in my watir scripts, in order to manipulate the app for testing. The actual file path for the config files will vary depending on the location from which the scripts are run. But the URL path is always constant. If I could access files using //localhost/myApp/config/config.xml, I would be in business. But this fails in ruby/watir. They don't seem to understand a path like that. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=488&aid=2574&group_id=104 From beth at squalor.com Tue Oct 4 13:34:09 2005 From: beth at squalor.com (beth ferguson) Date: Tue, 04 Oct 2005 10:34:09 -0700 Subject: [Wtr-general] javascript question Message-ID: <4342BD11.3000900@squalor.com> Hello All How do I move an