Re: [wtr-general] Re: Call to Arms :)
FYI, Taza Rocks, Page Objects are the only way to maintain thousands of tests and develop fast. Everybody should study Taza framework. There is a wealth of knowledge on testing in there. Especially the way Flow uses Page Objects to accomplish page transitions. So if you have not downloaded Taza and spent hours studying it you may miss why Ruby is AWESOME for browser testing marekj http://rubytester.com On Tue, Nov 16, 2010 at 9:25 AM, Charley Baker charley.ba...@gmail.com wrote: Taza has generators for each of it's objects, and a clean model for Sites, Pages and Elements. Filters can be applied to elements which we've used extensively for supporting Ajax heavy pages. Take a look at the wiki on github, it explains the basics behind Taza. I've never used Rasta, so I can't really help you there. Cheers, Charley Baker Lead Developer, Watir, http://watir.com On Tue, Nov 16, 2010 at 8:11 AM, Shiv tms...@gmail.com wrote: Hey Charley, I am already using Watir + Rasta for data driven test automation for my application. out of curiosity I have checked the cheesy link you sent to group. few question I have: can I use watir+rasta+taza ? what are the main features of taza framework? Thanks and Regards, Shiv On Tue, Nov 16, 2010 at 8:28 PM, Charley Baker charley.ba...@gmail.com wrote: I went through a couple of iterations of frameworks over the years with the result of lessons learned being designed into Taza. With over 70 testers adding code, I definitely experienced the pain of maintainability which Taza, and other practices were finally able to solve, so I feel your pain. :) Taza has partials for page areas like headers, footers, search, etc that show up on multiple pages. Cheers, Charley Baker Lead Developer, Watir, http://watir.com On Mon, Nov 15, 2010 at 7:26 PM, George george.sand...@gmail.com wrote: One question about Taza: Would this framework be effective for testing the same functionality across multiple pages? IOW, if there is a search feature that needs to be tested, but can be found on multiple pages, would Taza work for my needs? Thanks, George On Nov 15, 5:59 pm, George george.sand...@gmail.com wrote: Hi Charley, I might need to talk to you. As I've been learning Watir, I steered away from established frameworks (frankly, out of my lack of understanding) and developed my own framework which included HTML reporting. However, as the number of tests have been increasing and gaining more visibility to others within my team, I'm finding that it's become more difficult to maintain. So, I might need to (gulp) re-structure my tests. I still need to talk to my boss about this, but I'll take a look at those links and develop some simple tests. Hopefully, this will inspire me to adhere to already-established frameworks. -George On Nov 15, 1:34 pm, Charley Baker charley.ba...@gmail.com wrote: This might help some of you and definitely worth checking out :http://www.cheezyworld.com/ He has a couple of pages now on cucumber and browser testing, developing a page based framework. Tazahttps://github.com/scudco/tazaisa framework I've architected and used in several large companies, which has many of the same concepts that people are moving towards - e.g. page and site models. Please do check these out, use them and try not to reinvent your own framework. Ruby has builtin support for a base test library - a few of us have added additional test frameworks on top of that which are used in heavy large scale application testing with AJAX and all the goodness from years of experience. Cheezy's posts are a build up of real life experience using Watir and Cucumber on various client sites. I'd highly recommend following them, there are several more coming. I'll drop a hint, Taza is an awesome framework for web ui testing, well used and also extensible. If you want to get involved in either Taza or Watir, we've got a lot of work to do, and I'm happy to mentor from the newbie on up. Cheers, Charley -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com
Re: [wtr-general] Re: Help with Watir Page Checkers
Are you using IE8 ? or IE 7? When using IE 8 the IE#check_for_http_error doesn't raise an error as expected and always returns false. in IE7 it works. The implementation checks for IE 7 condition or assumes it's IE6 (yes, code was written before IE8 here) this line if m and m[1] =='7.0' could be patched as: if ['7.0', '8.0'].member?(m[1]) this would account for both IE7 and IE8 browsers. it's a bit late for me and I am too lazy to check further. but I think this is the reason the error is not raise when using checkers. Also please check the blog post I did a while back on checkers if you fancy that stuff. http://rubytester.com/blog/2009/07/27/watir-run-error-checks-callback-in-wait-method.html hth marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 On Wed, Mar 3, 2010 at 10:01 AM, yoggy samuelades...@googlemail.com wrote: Just an update to my previous post. Because the website am testing requires some form of LDAP authentication, the RESPONSE_CODE_CHECKER code checker i have written fails with a 401 everytime, any ideas as to how to fix this??? On Mar 3, 10:45 am, yoggy samuelades...@googlemail.com wrote: Hi Marek, I did what you told me to do and it justs prints a space and nothing else. I am not sure the checker which ships with Watir is robust enough to check the page response. I think it doesnt raise any exception for page which i am testing. The watir page checker code is below: def check_for_http_error # check for IE7 n = self.document.invoke('parentWindow').navigator.appVersion m=/MSIE\s(.*?);/.match( n ) if m and m[1] =='7.0' if m = /HTTP (\d\d\d.*)/.match( self.title ) raise NavigationException, m[1] end else # assume its IE6 url = self.document.location.href if /shdoclc.dll/.match(url) m = /id=IEText.*?(.*?)/i.match(self.html) raise NavigationException, m[1] if m end end false I dont know ruby too well but it seems to be doing some checks on url and body text of page displayed which i dont think would work extremely well for all web apps The error on page looks like: Server Error in '/' Application. Access is denied. Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL. Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server's administrator for additional assistance. so i wrote a custom error checker which uses the Net::Http.get_response for ruby and that seems to work okay. The code looks like that. RESPONSE_CODE_CHECKER = lambda do |browser| response = Net::HTTP.get_response(URI.parse(browser.url.to_s)) raise Watir::Exception::NavigationException unless(response.code =~ / 2|3\d{2}/ ) end I would appreciate some comments or feeback on this as i am not a ruby guru .. On Mar 3, 2:39 am, marekj marekj@gmail.com wrote: When you run those lines what happens? begin browser.add_checker PageCheckers::NAVIGATION_CHECKER browser.goto(http://www.somecrazynonexistantthing.com/reallynonexistant;) resuce= e put e end what is the value of e? marekj Watirloo: Semantic Page Objects in UseCaseshttp://github.com/marekj/watirloo/ Support Watir Projecthttp://pledgie.com/campaigns/2982 On Tue, Mar 2, 2010 at 10:16 AM, yoggy samuelades...@googlemail.com wrote: I have included the raise and it doesnt work still. I also removed the rescue and puts line still this doesnt work, My test stak is using Cucumber + Watir, could this be a reason ... Confused :( -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines:http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/watir-general -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- You received this message because you are subscribed to the Google Groups Watir General group
Re: [wtr-general] Re: Help with Watir Page Checkers
When you run those lines what happens? begin browser.add_checker PageCheckers::NAVIGATION_CHECKER browser.goto(http://www.somecrazynonexistantthing.com/reallynonexistant;) resuce= e put e end what is the value of e? marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 On Tue, Mar 2, 2010 at 10:16 AM, yoggy samuelades...@googlemail.com wrote: I have included the raise and it doesnt work still. I also removed the rescue and puts line still this doesnt work, My test stak is using Cucumber + Watir, could this be a reason ... Confused :( -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
Re: [wtr-general] Re: Switching from Test::Unit to RSpec - tips/gotchas? Short code review.
On Wed, Feb 24, 2010 at 11:12 AM, Adam Reed reed.a...@gmail.com wrote: Thanks Željko! 1. I used the require 'spec' so that I could execute the script in SciTE to check for simple errors before running spec from the command line. To your point, I will make sure not to include it on future scripts. 2. Agree with you on the before(:all)/(:each) - I'm still figuring out how that works practically in my tests. What is this? @browser ||= Watir::Browser.new 3. I actually took that from the RSpec example here: http://wiki.openqa.org/display/WTR/RSpec I hate to admit that I implemented it without knowing exactly what it did, but in testing it did not seem to change behavior. I have not used it with any other scripts but this first venture into RSpec. This ruby construct object ||= otherobject is equivalent to object = object || otherobject and similar to i += 1 meaning i = i + 1 in watir example: @browser ||= Watir::Browser.new means @browser = @browser || Watir::Browser.new a narrative could be: let the @browser be @browser if true else start new browser and initialize @browser value from constructor. HTH marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
Re: [wtr-general] Re: Watir, Rspec, and radio buttons.
On Tue, Feb 9, 2010 at 11:21 AM, James jgcpal...@gmail.com wrote: That worked perfectly, thanks! James On Feb 9, 12:13 pm, Charley Baker charley.ba...@gmail.com wrote: Oopsy daisy. I left out a dot. Note the dot before should. questionframe.radio(:id, rlbYesNo_0).checked?.should be_true I vote for: questionframe.radio(:id, rlbYesNo_0).should be_checked (or radio.should be_set) to negate questionframe.radio(:id, rlbYesNo_0).should_not be_checked more BDD flavor in this one. the matcher will call .checked? method automatically part of a be_ pattern I think any predicate in watir can be used in rspec, so exists? can e queried with element.should exist (Bret has fixed that) and include? will be should include('some value') more about predicates in rspec here http://rspec.rubyforge.org/rspec/1.3.0/classes/Spec/Matchers.html marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
Re: [wtr-general] fix funky command line behavior in watir-console
On Tue, Feb 9, 2010 at 9:50 AM, Alan Baird aba...@bairdsnet.net wrote: Marekj- You are using windows right? What I understood about this is that window commandline already had readline in it so putting it in irb was doing it twice which is what was messing up the commandline in windows. Hi Alan, Yes, using windows, I can use arrow up and down to recall commands but no ^A or ^E for jumping to the begining or end of line don't work in cmd.exe. however with --readline in irb I can use the commandline completion and some other shortcuts I'm not sure what tab tab and ctrl-r does, but I don't use them and i'd rather have the ability to type more than 80 chars. the CTRL+R recalls search and TAB TAB shows completion for methods in irb (these facilities are provided by readline). more here: http://www.bigsmoke.us/readline/shortcuts I probably don't really understand why it works...but it does. Not sure where i'd go to find out more? Alan Ha, I don't understand how this works either (but learning). I just thought I always need realine if I want to manipulate commandline with shortucts anyway, here is a nice write up http://bogojoker.com/readline/ I usually use Ctrl+A for jumping to the beginning and Ctr+E to end. Also Ctr+W for deleting previous word and 'tab tab' for method completion. Ctrl+R for search command history sometimes, but I mostly use up arrow to recall previous commands So yes, the --noreadline options works great for editing long lines (this is great news for windows user) I don't know if using 'rb-readline' gem helps in this regard at all. On Feb 8, 2010 10:49 AM, marekj marekj@gmail.com wrote: so I see that TABTAB and CTRL+R don't work without readline. and conf.io is now StdioInputMethod instead of ReadlineInputMethod So far I don't know what other implications may be for --noreadline option marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 On Mon, Feb 8, 2010 at 10:30 AM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Feb... -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
Re: [wtr-general] Re: Watir, Rspec, and radio buttons.
On Tue, Feb 9, 2010 at 4:54 PM, Alan Baird alan.ba...@riskmetrics.com wrote: According to http://rspec.rubyforge.org/rspec/1.1.9/classes/Spec/Matchers.html it would just be obj.should exist James - I agree that it should be this way, but the way I'm reading this line leads me to believe otherwise: All you need to do is write +should be_+ followed by the predicate without the question mark, and RSpec will figure it out from there. For example: [].should be_empty = [].empty? #passes [].should_not be_empty = [].empty? #fails Am I missing something? Alan Alan, the matchers are malleable and usually written in a way a person would talk. empty? = should be_empty (because some thing is empty) exists? = should exist (becuase there is no need to force be_ here) Rspec gives you a mechanism to define your matchers: so if you have a method like object.blinks? that returns true or false you can make a matcher object.should blink or object.should_not blink I did mention in my earlier post that element.should exist was a fix to rspec contributed by Bret a while back (too lazy to find the relevant code) marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
Re: [wtr-general] fix funky command line behavior in watir-console
I always have had USE_READLINE=true in my .irbrc and I am not sure what turning this off really does. I thought you need it for things like lookup up history of commands, up arrow navigation and CTR+R for searching the buffer, alos TabTab for completion lookup? I'll try to turn off readline and see if there are any unexpected consequences. any ideas about that? marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 On Fri, Feb 5, 2010 at 1:02 PM, Alan Baird alan.ba...@riskmetrics.com wrote: Here is another cool trick I learned today. I remember how cool it was when I found out about watir-console. You know, that tiny program that's in the /watir/bin folder that automagically requires watir for you when you want to perform some cool irb-style command line stuff with watir? However, I soon learned that watir-console has the same problem in the windows command line that irb does; whenever you go over a certain command line limit (somewhere around 80-100 characters) the command line just freaks out and skips around a bunch of lines. It makes irb completely unusable and you have to CTRL-C a bunch to get it back to sanity. Well, there is a way to fix this. All you need to do is type irb --noreadline and command line sanity will be restored. So, I was a little sad that I couldn't do the same thing to watir-console...until today. Since watir console is so simple, you just need to do the same thing to it that you did on the irb command line. Specifically, change: exec irb.bat #{$libs} -r rubygems -r irb/completion -r watir/irb-history -r watir --simple-prompt --readline to exec irb.bat #{$libs} -r rubygems -r irb/completion -r watir/irb-history -r watir --simple-prompt --noreadline I don't know why I didn't think about this earlier but oh well. I have restored command line sanity to my environment and all is well. Enjoy, Alan This email message and any attachments are for the sole use of the intended recipients and may contain proprietary and/or confidential information which may be privileged or otherwise protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy the original message and any copies of the message as well as any attachments to the original message. -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
Re: [wtr-general] fix funky command line behavior in watir-console
so I see that TABTAB and CTRL+R don't work without readline. and conf.io is now StdioInputMethod instead of ReadlineInputMethod So far I don't know what other implications may be for --noreadline option marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 On Mon, Feb 8, 2010 at 10:30 AM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Feb 8, 2010 at 5:12 PM, marekj marekj@gmail.com wrote: Support Watir Project http://pledgie.com/campaigns/2982 This is a great idea! :) I will use it in my signature too. Željko -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
Re: [wtr-general] Broken link in http://wtr.rubyforge.org/rdoc/classes/Watir/Container.html
Yes, I moved the old /rdoc to /rdoc/1.6.2 and instead of publishing the new rdoc in the same place I published it http://wtr.rubyforge.org/rdoc/1.6.5/ The new rdoc is based on hanna template and the methods are searchable. I've also made some examples and cleaned up some text that was breaking the new rdoc parser, namely all html elements inline need to be wrapped in tt tag all the rdoc is coming from my rdocfix branch of watir http://github.com/marekj/watir/rdocfix marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 On Wed, Feb 3, 2010 at 4:47 AM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Feb 2, 2010 at 10:09 AM, Frank Harper fhar...@greenliff.com wrote: I just went to http://wtr.rubyforge.org/rdoc/classes/Watir/Container.html#M81 The link is broken now. I guess Marek moved it somewhere. željko -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
Re: [wtr-general] Broken link in http://wtr.rubyforge.org/rdoc/classes/Watir/Container.html
That link is fixed in new rdoc http://wtr.rubyforge.org/rdoc/1.6.5/ and I'll turn it into a nice text link rather than url. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 On Tue, Feb 2, 2010 at 3:09 AM, Frank Harper fhar...@greenliff.com wrote: I just went to http://wtr.rubyforge.org/rdoc/classes/Watir/Container.html#M81 It says Valid values for ‘how’ are listed in the Watir Wiki - wiki.openqa.org/display/WTR/Methods+supported+by+Element But the page http://wiki.openqa.org/display/WTR/Methods+supported+by+Element; doesn't exist. http://wiki.openqa.org/display/WTR/Watir+Methods+Supported+by+HTML+Element; is suggested as a replacement. -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
Re: [wtr-general] What has happened to http://wtr.rubyforge.org/rdoc/ ?
Hi, I move the current rdoc for watir 1.6.2 to its current location http://wtr.rubyforge.org/rdoc/1.6.2 and made a new rdoc based on hanna template for release 1.6.5 http://wtr.rubyforge.org/rdoc/1.6.5 I also have generated yardoc files and I plan to put them somewhere. I can either leave the rdoc without index files so it will generate raw dir structure or I can make a nice index.html to poin to both old and new rdoc files as well as to now yardoc depending on how others like to read their docs. feedback is appreciated. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 On Mon, Feb 1, 2010 at 5:39 AM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Feb 1, 2010 at 12:33 PM, Prajakta Jadhav jadhav.praja...@gmail.com wrote: This page is showing some index instead of the Watir's RDoc with 3 lists. Marek created rdoc for Watir 1.6.5, and left the rdoc for 1.6.2. Click the one you want. Did I miss something? Apparently. :) Maybe it was discussed on wtr-development list. When did this page change? In the last week I think. Željko -- watir.com - community manager watirpodcast.com - host -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
Re: [wtr-general] Re: Issue with running watir on cygwin`
aha, so at this point I don't know anyone who actually uses the cygwin package ruby. I use c:/ruby/bin/ruby.exe which is a OneClickInstaller Ruby and I also use git bash for invoking gem and rake commands. Basically the git bash is the msys promp on windows, a replacement for cmd.exe. So is there are reason you need to use the cygwin ruby? or can you uninstall it. Then install the ruby one click installer and you can still use cygwin prompt to run all ruby stuff anyway marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 On Fri, Jan 29, 2010 at 9:40 AM, QAguy qablogm...@gmail.com wrote: which ruby returns usr/bin/ruby On Jan 28, 6:14 pm, marekj marekj@gmail.com wrote: I briefly looked at that thread and it looks like he had a Ruby from cygwin package and not a RubyInstaller when you run 'which ruby' does it return /cygdrive/c/ruby/bin/ruby? or /usr/bin/ruby ? I've never executed Watir tests with Ruby installed from cygwin, only from RubyInstaller for Windows marekj Watirloo: Semantic Page Objects in UseCaseshttp://github.com/marekj/watirloo/ Support Watir Projecthttp://pledgie.com/campaigns/2982 On Thu, Jan 28, 2010 at 12:05 PM, QAguy qablogm...@gmail.com wrote: I saw this thread: http://groups.google.com/group/watir-general/browse_thread/thread/b09... I would have responded to that thread but no reply option was available so I'm starting a new one. Was Acro's issue ever addressed. I have the same issue: When I try using 'x = Watir::Browser.new', I get a different error message: NameError: (eval):1:in `klass': uninitialized constant Watir::IE I wanted to use Git Bash but my tests require curb as well and for some reason I cannot install that gem via Git Bash so I went with Cygwin instead. Thanks in advance. -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines:http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/watir-general -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
Re: [wtr-general] Issue with running watir on cygwin`
I briefly looked at that thread and it looks like he had a Ruby from cygwin package and not a RubyInstaller when you run 'which ruby' does it return /cygdrive/c/ruby/bin/ruby? or /usr/bin/ruby ? I've never executed Watir tests with Ruby installed from cygwin, only from RubyInstaller for Windows marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 On Thu, Jan 28, 2010 at 12:05 PM, QAguy qablogm...@gmail.com wrote: I saw this thread: http://groups.google.com/group/watir-general/browse_thread/thread/b09e0b87c50075bd/cca465c8188a9044?lnk=gstq=permission+denied+ I would have responded to that thread but no reply option was available so I'm starting a new one. Was Acro's issue ever addressed. I have the same issue: When I try using 'x = Watir::Browser.new', I get a different error message: NameError: (eval):1:in `klass': uninitialized constant Watir::IE I wanted to use Git Bash but my tests require curb as well and for some reason I cannot install that gem via Git Bash so I went with Cygwin instead. Thanks in advance. -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
Re: [wtr-general] Re: :after? and :before? methods not supported for all elements?
I've never needed to do this type of access for text_field container.text_field(:after? = (element)) is Watir supposed to conform to this syntax? have you tried a comma instead of hash? container.text_field(:after?, (element)) yeah, looking at the code it appers: in span we use TaggedElementLocator while the text_field uses InputElementLocator and they both use diff def match? implementations. Can you provide the html you test against? (well, a relevant snippet) and if indeed this syntax should be the way to access textfield then please open an issue marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 On Wed, Jan 20, 2010 at 8:53 AM, Jarmo Pertman jarm...@gmail.com wrote: Sorry, stacktrace got truncated. Here is full one: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/locator.rb:127:in `before?': wrong number of arguments (0 for 1) (ArgumentError) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ locator.rb:127:in `send' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ locator.rb:127:in `match?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ locator.rb:112:in `locate' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ locator.rb:110:in `each' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ locator.rb:110:in `locate' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ locator.rb:108:in `catch' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ locator.rb:108:in `locate' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ locator.rb:105:in `each' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ locator.rb:105:in `locate' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ container.rb:742:in `locate_input_element' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements.rb:5:in `locate' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:49:in `assert_exists' from (eval):2:in `html' from S:/ui-tests/blahhh.rb:16 -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
[wtr-general] Re: watir cheat sheet
cool. well I was mostly addressing windows users so I didn't talk about sudo I also update the cheat to use 'watir-console' and talk about 'console.log' I am interested in showing how a tester can go from installing watit to running interactive test sessions on a browser in less than 30 seconds. On Jan 13, 6:02 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, Jan 13, 2010 at 5:42 AM, marekj marekj@gmail.com wrote: $ gem install cheat Mac (and probably Linux) users, do not forget you need sudo or `cheat watir` will not work (at least it did not work for me until I used sudo): $ sudo gem install cheat Thanks Marek, I am glad to see you more and more involved in Watir. :) Željko -- watir.com - community manager watirpodcast.com - host -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
[wtr-general] watir cheat sheet
http://cheat.errtheblog.com/s/watir or from your terminal window type $ gem install cheat #= this will install a cheat gem (if you are behind firewall set your HTTP_PROXY=http://host:port) $ cheat watir #= this will display the cheat sheet in your terminal marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
Re: [wtr-general] Please donate to the Watir project!
There is also a pledgie setup. http://pledgie.com/campaigns/2982 I just donated $10 marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ Support Watir Project http://pledgie.com/campaigns/2982 On Mon, Jan 11, 2010 at 6:45 PM, Alan Ark ar...@compli.com wrote: If you feel that Watir is useful to you or your organization, please think about donating to the project! There’s a donate link on the watir.com home page. I just donated $200 to help cover some hosting expenses that are coming out of people’s personal wallet. Not bad for almost 5 years of using this awesome software package. Think about it and do the right thing -Alan Alan Ark | QA Manager| Complí | ar...@compli.com | office: 503.963.4236 | fax: 503.294.1200 | www.compli.com -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general
[wtr-general] Re: Help with class,method,objects
if this is the method def def login(ie) login script text_field.set(adunme) text_field.set(adpwd) end then can you explain the line by line intention of this code? Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Thu, Jul 30, 2009 at 10:29 PM, Rohan Ojharohan.o...@bsil.com wrote: Hi, Yaa I am using the same but I have modified it for my usage. What I do is : class Tax_CheckMapping def returnExcelData(file,range) @range=range @file=file taxChkOpr=[] excelObject=Excel.new excelData=excelObject.getRowData(@file,'SCENARIOS-TESTDATA',@range) incr_i=0 excelData.each do |oneRow| taxChkOpr[incr_i]=Tax_CheckOperation.new taxChkOpr[incr_i].setUserData(oneRow['Admin User Name'].to_s,oneRow['Admin Password'].to_s ) incr_i=incr_i+1 end return taxChkOpr end end And in the second class I do the following operations : class Tax_CheckOperation attr_reader :adunme,:adpwd def intialize @adunme= @adpwd= end def setUserData(adunme,adpwd) @adunme=adunme @adpwd=adpwd end def login(ie) login script text_field.set(adunme) text_field.set(adpwd) end end Whearas in my script : taxChkMapper=Tax_CheckMapping.new taxChkOpr=taxChkMapper.returnExcelData(path of the excel file,’TC1’) TC1 is my identifier for test cases taxChkOpr.each do |eachIns| eachIns.login(ie) end So per say if my login method is not defined in the class Tax_CheckOperation I wont be able to access my variables ‘adunme’ and ‘adpwd’. I have also used the ‘’send’’ method as well but that’s not being fruitful either, Hope now the things are clearer for you guys to help me. Since I am not calling the method with the object of the class but instance of an array object. Thanks Rohan Ojha -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of George Sent: Friday, July 31, 2009 8:39 AM To: Watir General Subject: [wtr-general] Re: Help with class,method,objects Are you using the Excel interface class from Watir's site? http://wiki.openqa.org/display/WTR/Excel+interface+class On Jul 29, 9:57 pm, Rohan Ojha rohan.o...@bsil.com wrote: Hi All, I am not too sure whether I should post it here or in a Ruby forum. But there is a problem that I am facing while scripting a data driven Watir suite. 1) I have a class (say the base class) wherein I am fetching data from excel and storing them in a variable. 2) Now there's a generic method in the application which is stored in another Ruby file (not in a class, not in a module) 3) I need to call this generic method with the object of the base class (since the object has the data allotted to the variables) 4) But when I do this it says undefined method `methodName' for main:Object. So can somebody help me with this? What can I do so that I can access the methods and at the same time the data is set to variables for every row of excel sheet. Thanks in advance. Thanks, Rohan Ojha Blue Star Infotech l*+91 900 4955058l * +91 22 6688 6969 l 6 +91 22 6688 6999 l * mailto:rohan.o...@bsil.com rohan.o...@bsil.com http://www.bsil.com/www.bsil.com- Where Partnerships Are Built on Trust --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How Watir Works
Watir is open source. Source here http://github.com/bret/watir/tree/master Element class has some inner workings http://github.com/bret/watir/blob/90186971e94afb675bbebdff8183c00e2bc7302f/watir/lib/watir/element.rb marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ 2009/7/10 Ravinder Singroha ravindersingr...@gmail.com: Hi All Is there any document or website which explains how watir works? How watir finds an element using the physical attributes? how watir waits for browser to reach a sync state? is that information available freely somewhere? Thanks regards Ravinder Singroha +91-9717196269 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir + Cruise Control
I use Hudson. has a ruby and rake plugin. I use custom workspace for all jobs. The test code does not need to be checked out ever time. jobs triggered by rake tasks calling ci_reporter as dependency (the Test::Unit version) and task body just calls TestRunner.run TestCaseName TestCases are Watir::TestCase classes but each method is a collection of examples using Rspec matchers instead of assertions Hudson post-job collects the xml from test/results/*.xml generated b ci_reporter Ease and Joy (for now) my next step is to actually convert to Rspec ExampleGroups instead of TestCase And then covert ci_reporter to use rspec instead of testunit, should be painless but takes time I have about 6 hours of tests (all the slow ones included) about 20 jobs. And few jobs that are triggers I juse buildWithParameters options so I can pass some ENV variables into Hudson that's about it marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Thu, Jul 9, 2009 at 12:58 PM, Dylanmej...@gmail.com wrote: Does anyone know of a good tutorial/step-by-step instructions for how to integrate watir/ruby into a cruise control build cycle. I have 1 xml output file (from ci_reporter) and I want my script to run after the build and then integrate the xml results into the cruise control output. Thanks! -Dylan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Using watir can we check performance of an application
I use Watir IE with threads but at 25 browsers it's about max on a 2 gig memory machine. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Wed, Jul 8, 2009 at 9:01 AM, Maumitamaumita.majum...@gmail.com wrote: Hi, I am new in watir. I want to know can I do load testing using watir. My scenario is : I want to hit my web application using 100 users at the same time. We are developing a shopping site where our aim is to check the performance of the site, when 100 users hit the url at the same time and do some search for products to buy. Please help on this. This is an urgent requirement for my project. Thanks Maumita --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Trying to add a web interface to my scripts
Suggestion: get Hudson CI. put all the code in Hudson, make rake tasks that you define and allow others to trigger test jobs from Hudson web interface. Hookup ci_reporter to collect test pass/fail messages. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Thu, Jul 2, 2009 at 1:53 PM, ericewmo...@wildblue.net wrote: I am trying to add a web interface to my scripts to make them available to Manual testers and non QA testers doing UAT on different projects. Does anyone one have any suggestions on what would be a good approach. Language, tool, etc to accomplish this. Thanks, Eric --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Bug on minimize, restore and maximize functions - A possible resolution
Hi, Yes, the browser window movements, max, min, restore, bring_to_front rely on the DOM title. The way IE behaves is it displays the location in the title bar if 'title' tag is empty or does not exist. I have the following extension in Watirloo for dealing with windows in my tests The code handles 4 cases 1) When title exists then just display title (default) 2) When IE displays inbrowser PDF for example then title does not exist so the title is the http://url 3) When title is blank and IE displays document from local drive (NOT http) then locationUrl is a file://c:/data.html representaion but the title is c:\data.html 4) When title is blank and IE displays from server then then Window displays http:// location. Here is the code http://gist.github.com/141738 and the short version # Provides the Title of the IE Window # which may not equal to title DOM value # When title/title is empty OR does not exist in the DOM # (for example when PDF is displayed in browser) # Then return title_from_url string visible in the window # Else return title DOM value def title mytitle = begin @ie.document.title rescue WIN32OLERuntimeError = e #unknown property 'title' log WIN32OLERuntimeError: #{e} #return empty string for title value empty end (mytitle == )? title_from_url : mytitle end # When I have a file loaded in browser serverd by file system in location c:\data\file.html # And the title tag is empty # Then url method returns file:/// format file:///c:/data/file.html # But the window title displays c:\data\file.html # this method massages the locationUrl and returns its representation in title bar def title_from_url loc = url # relies on IE.url to return @ie.locationUrl and not @ie.document.url (loc[0,8] == file:///) ? loc.split(file:///)[1].gsub(/, '\\') : loc end Sorry, it's not on github yet and it's not part of Watir becasue I don't have all the tests loaded. It was hacked for specifi purpose of dealing with inbrowser PDF loading where I need to bring_to_front and save PDF locally using AutoIt. hope this helps someone. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Wed, Jul 1, 2009 at 4:33 AM, ricardo fernandesricardo.g.fernan...@gmail.com wrote: Hello. I found a bug on these functions minimize, restore and maximize. To replicate this error is very simple, create a page with no title or with a empty title. When this happen IE put the url is the window title. Then when we try to use one of these functions(minimize, restore and maximize) watir will call the function set_window_state in autoit using the title(code from ie-class): def set_window_state(state) autoit.WinSetState title, '', autoit.send(state) end but because the title is empty autoit will not find the window because the window title is the url and will not do nothing. I resolved this issue by changing the function title in ie-class to this: def title if(@ie.document.title==) return @ie.document.url else return @ie.document.title end end Watir code: require 'test/unit' require 'watir' class WebTest Test::Unit::TestCase def setup �...@browser = Watir::IE.new �...@browser.goto(http://localhost/FunFxTests/index2.html;) end def teardown �...@browser.close end def go_to_page �...@browser.minimize() �...@browser.restore() �...@browser.maximize() end def test_control go_to_page end end Html Code: html title/title frameset cols=50%,50% title=titulo1 text=texto2 frame src=index2.htm style=display:none; visibility:hidden frame src=index3.htm /frameset /html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: include? text with special characters
Is this issue happening only on this piece of text? I don't know the solution to this encoding problem with microsoft cp1252 but you can google it for some answers. As to the code let's break it down into 3 elements. 1. grab text from div with watir mytext = ie.div(:id, Info).text 2. use Ruby to find out if the text contains your string result = mytext.include? First line. Second line. (some text) 3. Finally use Rspec matcher result.should == true Where is the error happening here? it in grabbing the code or running include? or rspec part? Actually for rspec usage you can make a cleaner bdd language ie.div(:id, 'Info').text.should include(First line...etc..) instead of .include?.should == true marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Sun, Jul 5, 2009 at 7:17 PM, Peacepeaceofmind1...@gmail.com wrote: Hi everyone, I have a page with html like this: div id=Info class=ffreq First line. br/ Second line. (some text) br/ /div I try to use this watir code: ie.div(:id, Info).text.include?(First line. Second line. (some text)) .should==true I get this error: Some characters cannot be mapped using Cp1252 character encoding. Either change the encoding or remove the characters which are not supported by the Cp1252 character encoding. Did it see problem because of the parentheses in (some text)? How do I deal with the br/ in the middle of the text? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Test if a specific value exists in a field
see core Ruby String class and its methods http://www.ruby-doc.org/core/classes/String.html run examples, you will like it. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Sun, Jul 5, 2009 at 3:54 PM, Cadencdnwins...@gmail.com wrote: Hello, I would like to test if a specific value exists in a field. The following is what people use for div: $ie.div(:id, 'legend').text.include?(Bob T. Lewis) I want to use this for text_field, such as: $ie.browser.text_field (:id, 'legend').text.include?(Bob T. Lewis).should==true Should it work? I find it's difficult to use the rdoc. For example, I see people use .include?, exists?, etc., so I follow some examples and can use them. But in this case, I don't know if include? would work for text_field. If looking under rdoc: Watir::TextField, I do not see include?. I see the readonly? attribute. If the rdoc has examples for every attribute or method, such as in Watir::Container, it would be nice. And where can I see a list of all condition checks such as include?, enabled?, disabled?, and more ( This is just some suggestions for what to improve doc, besides lots of wonderful things about watir). Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Firewatir vs watir API
I've noticed that in my tests that parent returns a String in firefox. Some tests here http://github.com/marekj/watirloo/blob/7c5e757c0b2efce76f8254198ca62bb1c6d533b8/test/label_test.rb I've never needed to use parent so I didn't persue it but now might be a time to take a look at it again. marekj On Mon, Jun 1, 2009 at 7:06 PM, andrew.d...@lthree.com wrote: I have tests blowing up when I use 'parent', which is supported in watir, but does not seem to be in firewatir. Is there a way to access a parent node that is compatible across browsers? Is firewatir still the way to go when driving firefox? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Multiple Attributes for Text Fields
Your issue is using :id Per html spec there should not be a second instance of the same id on the page. if element with :id is found on the page Watir will not look for another instance on the page If you are stuck with :id and your developer absolutesly refuses to only maintain one instance of id then ie.text_fields.select {|tf| tf.id == aaa}[1].click #will blow up if there is no second one. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Thu, May 28, 2009 at 1:05 PM, Parvinder Ghotra parvinder.gho...@gmail.com wrote: Did watir ever provide multiple attribute support for Text fields and Drop downs. I was very surprised to find that the following doesn't work: $ie.text_field(:id = aaa, :index = 2) Is there plan to provide multiple attribute support for things like Text fields, drop downs, radio buttons, checkboxes and etc. Thank you! Parvinder Ghotra --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir Podcast #24 MarekJ and Charley Baker
Thanks a lot. That was fun. I would like to do a that again in this fun format and actually discuss some technical issues. Fun and Learning podcast and I will promise to sing more 'texas songs' about 'watir' marekj On Thu, May 28, 2009 at 2:35 AM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, May 27, 2009 at 7:40 PM, Tiffany Fodor tcfo...@comcast.net wrote: Nice that Baby Z* made his podcast debut - maybe he'll grow up to be a media mogul too! I think you could hear him in a podcast or two before, but from the other side of the door. This was the first time he got into the room. :) Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Running Watir suite from Hudson
Yes Lisa, I am using Hudson wit ci_reporter for harvesting 'test/reports/*.xml' files I have Rake plugin running the test. every test sits in a Rakefile in the follwing format task :name_of_test = [:set_ci_reporter] do require 'file_with_testcase_file' TestRunner.run TestCaseClassName # this may not be needed end # this is ci_reporter infrastructure desc 'set ci reporter precondition for tests' task :set_ci_reporter = [:test_helper] do gem 'ci_reporter' require 'ci/reporter/rake/test_unit' load 'ci/reporter/rake/test_unit_loader.rb' end desc set test helper task :test_helper do require 'rake/testtask' require 'rake/rdoctask' require 'test/unit/ui/console/testrunner' include Test::Unit::UI::Console end Hudson jobs are set up using custom workspace: I don't need to pull them from cvs, svn etc... at every build. and post build action is to publish junit test result report marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Thu, May 21, 2009 at 6:32 PM, Lisa Crispin lisa.cris...@gmail.com wrote: Is anyone using Hudson to run their Watir suites? Is there a Hudson plugin for Watir? We've always run our suites from the DOS window, using testrunner (we use the test/unit framework). But we really need to get it into a scheduled build. We can run it on a slave Windows vm from Hudson, but we aren't sure how to be able to see the results. Thanks, Lisa -- Lisa Crispin Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers and Agile Teams_ (Addison-Wesley 2009) http://lisacrispin.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to click on a text in side the SPAN tag. [puts ie.div(:id,'divSiteMapControl').innerText = Sitemap: Homepage|Administration|Manage Folders|New Folder]
SPANA title=Add, edit, and delete folders. href=/Tele-Works/Folders/ ManageFolders.aspxManage Folders/A/SPAN I see your span element includes anchor. I would think you want to send the click to that anchor instead of span browser.link(:text, Manage Folders).click marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Fri, May 8, 2009 at 4:11 PM, satish spanchumar...@gmail.com wrote: Hello guys, please help me with this. My HTML looks like this... I tried ie.span(:text, Manage Folders).click but link does not go to desired page. When I use flash on this(ie.span(:text, Manage Folders).flash) it actually flashes the exact Manage Folders text. puts ie.div(:id,'divSiteMapControl').innerText command give me this.. puts ie.div(:id,'divSiteMapControl').innerText = Sitemap: Homepage| Administration|Manage Folders|New Folder I want to click on the Manage Folders text link here and it should go to desired location. = Active Element: [TD], Index: [378] TD class=dxrp id=ctl00_rndPanSiteMap_RPC style=PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 0px; VERTICAL-ALIGN: top; WIDTH: 100%; PADDING-TOP: 9px; BACKGROUND-COLOR: #f7f7f7 DIV class=SitemapControlDiv id=divSiteMapControl NOBRSitemap: SPAN class=SitemapControlSpan id=spanSiteMapControlSpan SPAN id=ctl00_rndPanSiteMap_siteMapPathMain A href=#ctl00_rndPanSiteMap_siteMapPathMain_SkipLink IMG style=BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER- BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px height=0 alt=Skip Navigation Links src=/Tele-Works/WebResource.axd? d=cAb5NMJ5q4BLbiZtXy8MEw2 t=633735712698867038 width=0/A SPAN A title=Tele-Works administration console homepage. href=/Tele- Works/Homepage.aspxHomepage/A/SPAN SPAN class=SitemapPathSeparator|/SPAN SPAN A title=Administration homepage. href=/Tele-Works/ AdminHome.aspxAdministration/A/SPAN SPAN class=SitemapPathSeparator|/SPAN SPAN A title=Add, edit, and delete folders. href=/Tele-Works/Folders/ ManageFolders.aspxManage Folders/A/SPAN SPAN class=SitemapPathSeparator|/SPAN SPAN A title=Specify folder details. href=/Tele-Works/Folders/ FolderDetails.aspxNew Folder/A/SPAN A id=ctl00_rndPanSiteMap_siteMapPathMain_SkipLink/A/SPAN/ SPAN/NOBR /DIV/TD Appreciate your help. Thank you, Satish --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How do I get the page status (200, 404, 500, etc)
Maybe we need to make some distinctions here. I view Watir as a 'browser driver' in the sense that it talks to the DocumentObjectModel of a browser and doesn't care how the browser deals with http protocol (well, we can maybe peek a bit). Watir API is talking to the final composition of html, js, css, etc.. as a DOM entity and not separate the parts that it takes to build it. The browser builds the DOM, Watir can query the DOM and modify it and initiate the submit request to invoke a behavior the way a human user would. What you seem to be asking for is more like HtmlUnit which has a 'webclient as a substitute for a browser' where you can access the 'protocol' the webclient is using. There you can talk http protocol directly. In that paradign HtmlUnit IS the browser while in our paradimg we let the Browser be the Browser and Watir manipulate its DOM. The advantage of Watir is that it can test the final Behaviour as profided by the DOM to the user without managing the structural state of sessions, cookies and http requests. We instruct the browser to fetch a page but by the API which is simulating the way a user would do it using the Browser's mechanisms. This may be a trivial explanation but an important distinction I think. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Fri, Apr 24, 2009 at 6:26 AM, Jarmo Pertman jarm...@gmail.com wrote: Oh, you're right! I forgot to think anything about sessions and cookies :/ In that way it should be indeed easier just to scan page html... But anyway, I don't see why such things are needed. Why won't you just create normal tests, which assert multiple things and they would fail for sure if page is 404 or something similar? Jarmo On Apr 23, 6:22 pm, Paul Rogers paul.rog...@shaw.ca wrote: can you get openssl to work on windows. I dont remember if this is easy or hard. Watir is different to net/http. If you did a watir request, and then a net/http request, thats 2 requests. And you need to get all the cookies etc from the browser into net/http. And you wont get any javascript or ajax stuff happening. Paul On Thu, Apr 23, 2009 at 4:50 AM, Jarmo Pertman jarm...@gmail.com wrote: Sorry, you also need to replace require 'net/http' with require 'net/ https' Jarmo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: First level children only
I never needed to solve this problem but if I may nudge you towards this: 1. get the base div.html 2. and pump it to Hpricot for processing and maybe use 'children_of_type div call to get to divs you need. a wild suggestion since purely theoretical. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Tue, Apr 14, 2009 at 1:02 PM, andrew.d...@lthree.com wrote: How can xpath be used to return an array of divs? What would the xpath look like? On Apr 14, 10:30 am, Michael Hwee michael_h...@yahoo.com wrote: Can you try xpath? - Original Message From: andrew.d...@lthree.com andrew.d...@lthree.com To: Watir General watir-general@googlegroups.com Sent: Tuesday, April 14, 2009 7:54:53 AM Subject: [wtr-general] First level children only I have a large tree of nested divs, and I want to get an array of just the direct children of any particular div. I do not know ahead of time how many divs there will be at any level. Starting from a div, what is the Watir code for getting the divs that are direct children (and yes, there are other element types mixed in throughout)? Example div id=1 div/ div div/ div/ /div div/ /div divs() returns the entire list of all descendant div elements. I want just the first level children. Andy- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: uninitialized constant Windows::API::Error (NameError)
Had the same issue on Windows XP test machine here when upgrading framework to use watir 1.6.2 and Ruby 1.8.6-26 We had windows-pr-0.9.6.gem installed with watir 1.6.2 I upgraded to following gems and it's fine windows-pr-1.0.2 windows-api-0.3.0.gem win32-api-1.4.0-x86-mswin32-60.gem fyi: We maintain a private cache of gems here so I can prepackage installation on our test machines here with rake tasks On Apr 7, 3:13 am, frank.li lizhiguoem...@gmail.com wrote: This issue is windows-pr version resolution: Gem uninstall windows-pr Gem install windows-pr answer from http://www.zhuaijun.cn/archives/53 On 3月30日, 下午11时22分, Dennis I. ideler.den...@gmail.com wrote: I tried installing Watir at home a while ago and kept getting an error. I followed some instructions here from a different discussion that mentioned installing and reinstalling some gems. That didn't work. And today I tried again. Here is the error that I get. ruby test.rb C:/Ruby/lib/ruby/gems/1.8/gems/windows-pr-0.9.3/lib/windows/thread.rb: 59: uninitialized constant Windows::API::Error (NameError) from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.9/lib/win32/ process.rb:3 from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie- process.rb:1 from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:45 from test.rb:22 Test executed on Mon Mar 30 12:14:05 -0300 2009 Here is the code until where it gets stuck: require 'watir' time = Time.now.to_s puts Test executed on +time test_site = http://www.google.com; ie = Watir::IE.open(test_site) # this is line 22 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir design patterns?
This is a large topic. For the last two years I have designed frameworks for two clients. In the last year alone I have redesinged a framework twice I think with patterns in mind. The first pattern I used was Adapter which was to put a buffer between semantic naming of elements on the page and the physical DOM elements.This Adapter way of thinking is what Page class I about for me. Translate logical to physical (I see similar way of thinking in Taza and Watircraft and Rasta) The next patterns are Template and Builder. I base most of my test scenarios on the mixture of those two. Builder patterns is great in dealing with various configurations in UseCases where each scenario is a composition of objects that give it whole. Template is the type of patterns where I define the main test scenario and I vary it according to the needed test conditions. I also use Decorators a lot in a form of modules mixed into objects that provide specialized just-in-time implementations. All of it give it loose coupling and rapid ability to reconfigure tests because most of my work I is exploratory testing so i need to configure test conditions quickly to get to a place where I can introduce variance to test a very specific test conditions. I also use Strategy pattern but not too much, it's complicated for me. too much work for ROI. As a teser ROI is important. The most important I think. I need to show to my client that I can do some test condition preparation 'FAST' when it matters. It does not pay to have 'beautifule automated tests' or 'Clean automated tests' the payoff is 'running tests' They have to run and they have to be configured fast. All else is 'window dressing' as I usually say. ROI is important I think so I structure my tests this way. Anyway, this is my two.to_i cents here sharing some thoughts. Good weekend to all and don't forget the Rspec as a 'pattern' . it is worth studying especially the matchers as a way of expressing behavioral expectations and the sequential execution. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Fri, Apr 3, 2009 at 3:09 PM, Jim Knowlton jknowlton...@gmail.com wrote: I think the biggest thing alot of us Watir developers need is a good guide to design patterns with Watir. I know for myself, I know the commands and basic syntax pretty well, and can design a test structure that works, but I'm sure there are things I'm doing that could be designed better (I'm a tester, after all, not a full-time programmer). I'd love a guide that describes best practices for how to set up a directory structure, set up rake for common tasks, etc. I know WatirCraft attempts to address this to some extent, but I guess I'm suggesting that some people might need to design their own framework, but not know how to do it. My two cents. Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to capture unique session ID from URL
Try URI::HTTP class. if you have url http://hostname/path/to/file?key=valukey2=value42; then require 'uri' uri = URI.parse ie.url gives you an uri object that conforms to HTTP protocol, so url.query.split('') # = array of queryitems =['key=value', 'key2=value42'] you can then reconstruct the uri object with whatever you want and pass it back to watir as so if you have session = jsessionid=AbraCadA43BraSalthUnd42Pepper you can add it to existing query url.query = (queryitems.concat session).join('') and click it. uri.to_s # becuse you click text and not object you end up with this url http://hostname/path/to/file?key=valukey2=value42jsessionid=AbraCadA43BraSalthUnd42Pepper Do more homework here http://www.ruby-doc.org/core/classes/URI/HTTP.html marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Tue, Mar 31, 2009 at 12:03 AM, vasu br.vas...@gmail.com wrote: Dear All, Iam using datadriven framework, and used href to click on a link. It was working fine. Now for security reason unique session ID was also generated and same was updated to the href for each login session. Please let me know how to capture the sessionID from URL and update the same in XLS. My script is like this: ie.link(:href, record4['url']).click ie.textField(:name, targetnumber).set(record4['targetnumber']) Previous url was like this: https://abcd.com/test.in?cmd=p2p now it is like this : https://abcd.com/test.in;jsessionid=JRvbP1CyCY5tMd153lZJ9mzp5Rv7tNWQ4n232VL1GZFT1sppsTQ5!878380993https://abcd.com/test.in;jsessionid=JRvbP1CyCY5tMd153lZJ9mzp5Rv7tNWQ4n232VL1GZFT1sppsTQ5%21878380993 I want to capture the jsessionid generated. Please help me it is very urgent thanks, vasu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How can I get Horizontal Position of an element in watir
Yeah! Goldmine of knowledge there in those links Thanks Alan marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Wed, Mar 25, 2009 at 9:08 AM, Alan Baird alan.ba...@riskmetrics.comwrote: You can also look at: http://wiki.openqa.org/display/WTR/Right+Click+an+Element There are a couple of methods that we defined in order to get the coordinates of an object. Alan -- *From:* watir-general@googlegroups.com [mailto: watir-gene...@googlegroups.com] *On Behalf Of *marekj *Sent:* Tuesday, March 24, 2009 5:58 PM *To:* watir-general@googlegroups.com *Subject:* [wtr-general] Re: How can I get Horizontal Position of an element in watir try browser.element.document.currentstyle.position if it returns 'static' the element is in normal flow of DOM and you can't get the other properties. that's why browser.element.document.currentstyle.top returns 'auto' in IE. if it is positioned with css you can get to it with top, width and so on read on css and currentStyle marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Mon, Mar 23, 2009 at 11:39 PM, aditi aditi_...@yahoo.com wrote: Hi, How can I get Horizontal,Top Position of an element in Watir. Please help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How can I get Horizontal Position of an element in watir
try browser.element.document.currentstyle.position if it returns 'static' the element is in normal flow of DOM and you can't get the other properties. that's why browser.element.document.currentstyle.top returns 'auto' in IE. if it is positioned with css you can get to it with top, width and so on read on css and currentStyle marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Mon, Mar 23, 2009 at 11:39 PM, aditi aditi_...@yahoo.com wrote: Hi, How can I get Horizontal,Top Position of an element in Watir. Please help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Problems locating basic elements in Watir
Welcome to Ruby and Watir. Glad you jumped in. It's a great language and Watir is a nice library. about your issue: you may try right after you login click to capture the html and see what's there; try with; puts ie.html.inspect after ie.button(how, what).click line Another possible issue may be a hidden frame (frameset). Just a wild guess since I've seen it happen in a couple of apps I worked with. Also I noticed that the HTML generated by IEDeveloperToolbar is not really the HTML that's on the page. The IEDevToolbar adds its own head info for meta doctype and styles. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Tue, Mar 17, 2009 at 10:05 AM, Mark Lehky mark.le...@aclaro.com wrote: Hello all. I am new to Watir as well as Ruby, but have had experience with other tools and languages. Installed Ruby+Watir (no issues), ran through the basic tutorial, everything worked just fine. I then tried to create the first test for my AUT. The test was quite simple: login and try to locate some text on the next page. The login portion worked: found the two text boxes (username/password), found the login button. However, the next page is effectively blank to Watir. For any element that I tried to .flash, I always got the error: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_exists': Unable to locate element, using :id, c_ddlCategory (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:239:in `flash' from petroLook_login.rb:15 After searching through past posts here, I was led to Webmetrics RIA Script Recorder. That tool cannot see of the elements either - nothing is recorded after the login page. :( Here is my sample Watir test: require watir test_site = http://localhost/petroLook4410; ie = Watir::IE.new ie.goto test_site if ! ie.text.include? Login puts Test Failed! Could not find: 'Login'. exit 1 end ie.text_field(:id, c__txtUsername).set bootstrap ie.text_field(:id, c__txtPassword).set bootstrap ie.button(:id, c__btnLogin).click # everything past this point is gone if ! ie.text.include? Activating the database puts Test Failed! Could not find: 'Activating the database'. exit 1 end puts All good! exit 0 Here is the HTML code snippet grabbed from IE Developer Toolbar of the above text (I wonder how e-mail clients are going to handle this - I am typing this in plaintext-mode): !DOCTYPE HTML PUBLIC -//W3C//DTD HTML Transitional//EN META http-equiv=Content-Type content=text/html; charset=windows-1252 HTML class= page id=html HEAD STYLE /* No matching styles were found. */ /STYLE /HEAD BODY class= page ie id=body FORM id=frmControlHost name=frmControlHost action=WebPages_ControlHost.aspx?control=aclaro.petroLook.WebControls.Generic.PageHostpagetype=Admincategory=Bootstrapgroup=Schema method=post PActivating the database enables petroLook users to log in and disables the bootstrap user.nbsp;/P /FORM /BODY /HTML TIA for any help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Problems locating basic elements in Watir
I see the wild guess worked. Each document in a frame is probably a separate DOM and I presume the framesets were built as a view so each frame could be refreshed independently. Now you may want to build a map of frames but don't do assignment like this frame = ie.frame(how, what) because if the page refreshes inside the frame your frame variable holds reference to a stale object which does not exist to make sure you always have access to the latest DOM in frames I would build some methods: like so: def browser @ie # or any other browser end def content frame(:id, 'contentFrame') end def top frame(:id, 'frameTop') end now you can access your DOM in a frame browser.content.top.element browser.content.element you decide the semantic method names you want to give to frames you make small method wrappers for your watir code. it helps you clarify what frame is what. (I am sorry but Watirloo is still not intuitive enough to recommend it but I am working on it) marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Tue, Mar 17, 2009 at 3:39 PM, Mark Lehky mark.le...@aclaro.com wrote: For anyone following this thread: Yes, you can traverse the frames as I indicated below, and it works! :D Now, can I do the same using XPath ... 2009/3/17 Mark Lehky mark.le...@aclaro.com: I think the answer is somewhere in your suggestion. The element(s) that I am looking for is quite deep in several nested FRAMESET/FRAME/FRAMESET/FRAME/... Is there a way in Watir/Ruby to say in any frame, no matter how deep? If not, how do I traverse them? Can I do something like: ie = Watir::IE.new frame1 = ie.frame(:id, contentFrame) frame2 = frame1.frame(:id, frameTop) ...etc. Thank You all for the help so far. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: get attribute through xpath
how about? browser.link(:id, 'dtrSeriesRightsWindowAncho').attribute_value(title) marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Mon, Mar 16, 2009 at 7:55 AM, aidy lewis aidy.le...@googlemail.comwrote: Chuck. This was a non-standard HTML attribute so I had to use element_by_xpath to connect directly to the object through win32ole and then I was able to invoke raw DOM methods upon it. Aidy 2009/3/16 Chuck van der Linden sqa...@gmail.com: I am unable to retrieve an attribute of the below HTML snippet through standard Watir methods what did you try? that looks like a simple link to me, you should be able to deal with it via standard .link type methods without seeing a larger sample of the html surrounding that item, it's difficult to know why you might not have been able to address it, but offhand I'd start by asking if perhaps it's inside a frame or something? did you try using the IE developer toolbar to have a look at that item and see where it exists inside the DOM of the page? On Mar 14, 9:23 am, aidy lewis aidy.le...@googlemail.com wrote: Hi, I am unable to retrieve an attribute of the below HTML snippet through standard Watir methods a id=dtrSeriesRightsWindowAnchor href=http://site.co.uk/index.htm; title=Awaiting approval I have tried the following XPath browser.element_by_xpath(//a...@id='dtrSeriesRightsWindowAnchor']...@title) I am hooking onto the obejct, but I am unsure on how to retrieve the value of title. Thanks Aidy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to print all the methods in the Class or Module out?
'require' and 'include' are completely two different concepts. When you require a ruby file you tell the current file to look for classes and modules in that file when needed, also any code not wrapped in method will be executed on require automatically. So you have to 'require' other file before you can 'include' modules that it owns. it's not either-or proposition. When you include a module into a class your class inherits methods defined in the module as it's own. You can see this in a decorator pattern. here is a good simple example with Coffee and Cream module http://ruby.simapse.com/2008/08/test.html Let's say you have a 1 bedroom apartment and one day you buy another 1 bedroom apartment next to yours. Now you are the owner of two apartments and you are free to go next door and use anything in that apartment for your needs in your first apartment. Include is like if one day you decide to knock the walls between two apartments and make it one. Therefore you no longer have to go next door, it is now part of your apartment. (disclaimer: I am hoping to write about Metaphors We Ruby By. how am I doing?) marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Thu, Mar 12, 2009 at 5:54 PM, Chuck van der Linden sqa...@gmail.comwrote: I'm still learning a lot regarding how ruby handles modules, classes etc.. but in general, woudln't using require instead of include solve his problem? (unless he's actually extending or subclassing stuff from the modules) I thought I remember seeing something about a lot of folks using include 'watir' when they should be using require 'watir' On Mar 12, 3:00 pm, marekj marekj@gmail.com wrote: On Thu, Mar 12, 2009 at 4:38 AM, wesley chen cjq@gmail.com wrote: Thanks, :), it is exactly what I want. I ask this kind of questions because I find, in my code, I use too many: include module. When I include the module into the class, all the methods in the module comes into the class's method. That's terrible. to remove the 'terrible' from listing do this use Object.local_methods patch. class Object def local_methods (methods - Object.instance_methods).sort end end so if you have class Foo def foo 'foo' end end then Bla.new.local_methods #= ['foo'] if you want methods defined only as instances of that object. useful. Wirble uses it for irb inspectionhttp://pablotron.org/software/wirble/ marekj Watirloo: Semantic Page Objects in UseCases Human Readable Machine Executable Acceptance Testinghttp:// github.com/marekj/watirloo/ Thanks. Wesley Chen.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: checkbox selection
In Watirloo there is class CheckboxGroup for that http://github.com/marekj/watirloo/blob/7c5e757c0b2efce76f8254198ca62bb1c6d533b8/lib/watirloo/watir_ducktape.rb or you can roll your own solution easy. Each checkbox has to have the same 'name' to belown in a group, id is irrelevant at this point. name = 'your_checkbox_name_value' group = browser.checkboxes.find_all do |cb| cb.name == name end now you have a collection of checkboxes that share the same name. to set the 3rd checkbox you say group[2].set etc... marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Fri, Mar 13, 2009 at 10:44 AM, jitu jitu.ghar...@gmail.com wrote: How do i select particular checkbox from the table as every checkbox has same id and i don't want to use the value of that checkbox Thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir users: What is your role at work?
I used to be a tester. Then I became Test Design, Test Analyst, Test Developer, Test Architect etc... now I am just a Test Investigator I think. More and more I see testing as a discipline of investigating where Value is created and were it is Diminished. I can do it with automation code or manually going through an application of asking questions in a meeting with a developer to uncover my and his bias towards the problem space and proposes solutions. I think the days of QA Tester are over, (I mean in the sense of Quality Assurance school of testing) marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: css support in Watir
ie.element.document.currentStyle returns styles for example ie.element.document.currentStyle.fontSize ie.element.document.currentStyle.fontWeight. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Wed, Mar 11, 2009 at 5:10 PM, Federico Zuppa fzu...@gmail.com wrote: Hi all, I am trying to do a test that verifies that 2 items in the page have the same css style (just a couple of properties, like font-size and font-weight). I saw there is an attribute called style that returns an ole_object and also saw there's a method ole_get_methods that return all the methods supported by the ole_object(fontStyle and fontWeight). However, when I try to print the fontSize, it doesn't print anything. Has anyone done this before? Do you have any examples I could follow? Thanks! Federico --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Hoe to Execute another scripts
sorry, but Hoe, http://seattlerb.rubyforge.org/hoe/ would not be the best way to execute scripts Use Rake, SpecTask or good old TestUnit runner. marekj Watirloo: Semantic Page Objects in UseCases Human Readable Machine Executable Acceptance Testing http://github.com/marekj/watirloo/ On Thu, Mar 12, 2009 at 7:02 AM, Vikas Tulashyam vtulash...@gmail.comwrote: Hi Guys, Please provide me the solution for the following problems 1. I want to execute ruby scripts from a single file, like I want to create a Test suite and want to call each test case which is a separate ruby file, so how to call scripts. 2. I am creating some common utilities for my project , so How I can call them in my projects, let say I have created a Module 'CommonUtils' in Directory-file - C://Test/Common.rb . So can I call this scripts by providing the exact path of the ruby script and I can call this within that folder only. Thanks in advance Vikas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to print all the methods in the Class or Module out?
On Thu, Mar 12, 2009 at 4:38 AM, wesley chen cjq@gmail.com wrote: Thanks, :), it is exactly what I want. I ask this kind of questions because I find, in my code, I use too many: include module. When I include the module into the class, all the methods in the module comes into the class's method. That's terrible. to remove the 'terrible' from listing do this use Object.local_methods patch. class Object def local_methods (methods - Object.instance_methods).sort end end so if you have class Foo def foo 'foo' end end then Bla.new.local_methods #= ['foo'] if you want methods defined only as instances of that object. useful. Wirble uses it for irb inspection http://pablotron.org/software/wirble/ marekj Watirloo: Semantic Page Objects in UseCases Human Readable Machine Executable Acceptance Testing http://github.com/marekj/watirloo/ Thanks. Wesley Chen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: When do you start writing WATiR scripts?
Look at WatirCraft gem and other frameworks Do NOT write tests talking to Document Object Model elements, but DO write tests expressed as Semantic Page Objects, or 'fields' in WatirCraft if you are on the page and you need to enter last name you write page.last_name = 'Manikawalikanisiy' page.first_name = 'Evgeny' better yet page.populate :last_name = 'Foo', :first_name = 'Bar Let Page class act as adapter to DOM and Watir. more here: http://github.com/bret/watircraft/tree/master I think I would call this a Semantic Page Objects Testing approach, some people call this keyword driven testing but the keywords are not action words necessarily, they are 'token' referencing 'objects of interest' on the page and you name then based on your Business Domain model. One can write those tests before UI even exists in a similar manner that Rspec advocates writing examples using code 'you wish you had'. You end up with tests that express intent of business entities and actions and you wire it up to talk to DOM later. This way you build human readable test case library and you end up having it executable at some point. marekj Watirloo: Semantic Page Objects in UseCases Human Readable Machine Executable Acceptance Testing http://github.com/marekj/watirloo/ On Wed, Aug 6, 2008 at 8:06 AM, Bhavna Kumar bhavna.ku...@gmail.com wrote: Hi, This is more of a process query than a technical one. We have introduced WATiR scripting in our org and are working on getting testers familiar with doing test cases in WATiR. Within the org, we are debating whether to use WATiR to build a smoke/regression testing suite (which basically means manual testing for releases, followed by post facto WATiR development) or to use it for actual testing. Using it for actual testing would mean that scripts would break as UI changes happen (and this happens quite a bit till functionality stabilizes). I'm curious to know at what point you folks begin WATiR testing in the development cycle? If used for actual testing, then what has your experience been? Thanks in advance, Bhavna --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: installing watir behind a firewall on Windows
location like : C:\ruby\lib\ruby\gems\1.8\cache is where gem command copies gems to when it is installing them. I am not sure if there may be a conflict there. (just being paranoid) I would put all your *.gem files you pulled form machine1 to c:\tempgem\*.gem location first and I would not touch rugby\1.8\cache dir. let gem command manage that so, then open cmd.exe in that temp location and run from that dir. c:\tempgem install watir --local this should install watir and all dependencies (provided you have them in tha FileList) and then gem command will copy the gem to the c:\ruby\lib\ruby\gems\1.8\cache for its own keeping. look at 'gem help commands' command to look at other options. notice that 1) gem pristine command uses the gems\1.8\cache dir for reinstalling gems 2) if you are behind firewall and you can keep all the gems on a local server box. and then do gem install -source URL 3) look at 'gem help mirror' command. you can move the gems around from machine to machine as a bootstrapping option 4) When installing a gem check for dependency gem dependency gemname it should give you a list from gemspec files. 5) as a last resort just do 'gem install gemname --force to ditch dependency but you will have to resolve them manually (warning: not fun) HTH marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Mon, Mar 9, 2009 at 3:24 PM, MatchBook jeffrey.fl...@gmail.com wrote: I played with using the --local option on a computer that has watir already installed. I expected to get a message like already installed, but instead: C:\ruby\lib\ruby\gems\1.8\cachegem install watir --local ERROR: While executing gem ... (NoMethodError) undefined method `include?' for nil:NilClass On Mar 6, 2:21 pm, MatchBook jeffrey.fl...@gmail.com wrote: Al, It necessary for me to specify the cache directory? (Or can you confirm for where the correct place is to place the cache directory?) Here is what I have tried so far: p:\Jeffgem install watir -l ERROR: While executing gem ... (RuntimeEr Error instaling watir: watir requires commonwatir = 1.6.2 p:\Jeffgem install watir -l -i p:\jeff\cache ERROR: While executing gem ... (RuntimeError) Error instaling watir: watir requires commonwatir = 1.6.2 In the first case, I put the cache in C:\ruby\lib\ruby\gems \1.8\cache. In the second case, I tried another directory (I am not sure if that is what the -i option is for). Since the commonwatir gem is in the cache, apparently it is not looking at my copied cache. Jeff On Mar 5, 6:54 pm, Al Snow jas...@hotmail.com wrote: Jeff, After you have the gem copied to your machine, you can run this command: gem install watir --local where the --local will only look for the gem to install on your local machine. Thanks, Al Snow Agile Software Automation Architect Linkedin:http://www.linkedin.com/in/alsnow Google Talk: jasnow1 Twitter: jasnow Date: Thu, 5 Mar 2009 17:12:21 -0800 Subject: [wtr-general] installing watir behind a firewall on Windows From: jeffrey.fl...@gmail.com To: watir-general@googlegroups.com I am not able to install watir on Windows either by using the HTTP_PROXY environmental variable, nor by using the -p option for gem install. My firewall is password protected, so I get a 407 error. I resorted to zipping up the cache directory from a machine that is not behind a firewall(C:\ruby\lib\ruby\gems\1.8\cache) and copying the zip file to the machine that is behind the firewall. Now, I need help with the right gem install command to get this local cache to be recognized. I appreciate it! Jeff _ Windows Live™: Life without walls. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_032...Hidequoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to automate site with Captcha?
Charley, Will there be any Annual Boiled Watir Award winners announced soon? marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Sat, Mar 7, 2009 at 4:17 PM, Charley Baker charley.ba...@gmail.comwrote: That's awesome, an automated way to handle the captcha. You're kidding right? Or this is the best post ever. -c On Sat, Mar 7, 2009 at 1:33 PM, Margam nk.mar...@gmail.com wrote: Hello everyone, For my current client's web site testing requirement, I need to handle a page that has a Captcha. I tried searching the group for any similar treads, but could not. Can anyone help with steps to handle the Captcha? Like getting the text in the captcha image. Thank you very much. Margam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: msvcr80-ruby18.dll was not found error troubles
Just to throw 2 cents. After installing Ruby I always upgrade gems first before installing any other gems. The 1.8.6 of ruby comes with gems version 0.9.2. I update gems first to 1.3.1 and then install watir 1.6.2 and above. This migration on 6 machines so far from Ruby 1.8.5 has worked ok for me. and thanks for the write up on the these obscure dependencies. marekj Watirloo: Semantic Page Objects in UseCases Human Readable Machine Executable Acceptance Testing http://github.com/marekj/watirloo/ On Sat, Feb 21, 2009 at 12:00 PM, Charley Baker charley.ba...@gmail.com wrote: Hey Jeff et al, Thanks for sending the mail. I immediately saw what I glossed over when we were chatting, it is in fact the problem I suspected with a gem that was compiled with Visual Studio 2005 - namely win32-api. For the past two releases - 1.3.0 and 1.4.0, there are 3 versions of the win32-api gem: win32-api-1.4.0-x86-mswin32-80.gem win32-api-1.4.0-x86-mswin32-60.gem win32-api-1.4.0.gem Rubygems makes the best guess for your platform when installing gems, the gems above should rely on your ruby environment to pick the right one, the first is for systems that match the environment set in the gem metadata: x86-mswin32-80 - windows Ruby compiled with VS2005 (the msvc runtime version 8), the second one should match the normal Windows one click installer version of Ruby compiled with MSVC6, and the third would be installed on systems where you'd compile the shared libraries for the gem on your system. I didn't realize there are now multiple versions of the gem. There's been some development using VS2005 or minGW to compile 1.9.1 for the next One Click Installer to replace the over 10 year old, hard to find MSVC6 compiler to create the c extensions and libraries used by ruby and other gems. I'd assume this new gem 80 is for some of that work. I'm not quite sure why Rubygems is installing this particular version in some cases, if anyone is still having the issue or can reproduce it, let me know. You can force gems to install the right version, but I'm also curious to see why this is happening. gem install win32-api --platform x86-mswin32-60 Thanks, Charley Baker blog: http://charleybakersblog.blogspot.com/ Lead Developer, Watir, http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Fri, Feb 20, 2009 at 7:27 PM, Jeff Fry jeff@gmail.com wrote: Al: Yeah, I was referencing that thread above. It pointed toward Visual Studio, which I don't have. Charley theorized off list that one of the gems on my system might have been compiled using Visual Studio. Bret: Doh. Typo, but the first error (msvcr80-ruby18.dll was not found) was occuring when I did anything watir-related, including valid things like running tests that used to work or doing irb(main):002:0 Watir::IE::VERSION That said, I just uninstalled and reinstalled ruby 1.8.5 1.8.6, and then reinstalled watir...and all seems to be working for me now. Thanks! Jeff On Fri, Feb 20, 2009 at 6:10 PM, Bret Pettichord b...@pettichord.com wrote: Jeff Fry wrote: irb(main):003:0 Watir::IE::BROWSER NameError: uninitialized constant Watir::IE::BROWSER from (irb):3 This is correct, and what I get too. There is no such thing as Watir::IE:BROWSER. Bret -- Jeff Fry http://testingjeff.wordpress.com http://associationforsoftwaretesting.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to Drag and Drop with Watir?
Paul, Would you be willing to just put this on github (well, the parts you can open source) anb let others take a look at it Thank you kindly. marekj Watirloo: Semantic Page Objects in UseCases Human Readable Machine Executable Acceptance Testing http://github.com/marekj/watirloo/ On Fri, Feb 13, 2009 at 10:27 AM, Paul Rogers paul.rog...@shaw.ca wrote: The app Ive been working on is all drag and drop. I think Im a reasonable javascript developer, and I know a bit about watir ;-) Drag and drop is really hard on my app. You need to have a really good understanding of the dom. Some of the more recent libraries, jquery , prototype etc have made it much simpler for developers, and make it easier for testers too, as there are now fewer different ways that drag drop is likely to be implemented. Ive got code to do this for ie and firefox for the app I work on and Ive created sample apps using jquery and prototype, but my code for IE isnt currently working for these ( it works fine for firefox though) However I still need to do more unit tests, and update to the latest watir releases. I was hoping to have all this done by now, but as is the way of the world, Im running behind. Im still committed to getting this done, but dont have a whole lot of time for the next 8 weeks or so. So it might happen by the end of April. Paul On Fri, Feb 13, 2009 at 9:15 AM, JackieH jkulb...@juno.com wrote: I have to agree. I have really enjoyed learning Watir and find it very easy and intuitive to use, but in tasked with scripting a page that contains Drag and Drop it has been a challenge to say the least. I have tried many examples from the group and the code provided on the Wiki but it is like Bill said, almost a different language. I understand that scripting purely mouse driven events is going to be difficult, but it just seems that there are so many smart people in this group that the solutions would be better defined... On Feb 12, 10:04 am, Bill Mosteller w...@greatdecals.com wrote: 30 June 2006, dannyy wrote: We are able to write very robust and concise test cases, such as automating drag-and-drop without knowing how such behavior is implemented. I'm wondering what he's talking about? I've successfully written drag and drop scripts in SilkTest and Selenium, but doing so in Watir appears to be very difficult. The few examples I've seen are so different from the isn't-this-easy tutorials on Watir as to be almost a different language. The drag_contents_to method appears so specialized as to be useless for any sort of actual drag and drop automation I'd actually be able to use. When forum members comment on drag and drop difficulties, others tell them when they're older they'll understand. Such guidance is not so helpful when I'm trying to field a test suite that must include drag and drop. Bill Mosteller Eloqua -- Paul Rogers! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Fixing the new Watir problem
FYI, I am on WinXP and all is fine with the following gems. (I'll check my Vista setup tonight) watir 1.6.2 commonwatir 1.6.2 win32-api (1.2.2) windows-api (0.2.4) windows-pr (0.9.6) RubyGems Environment: - RUBYGEMS VERSION: 1.3.1 - RUBY VERSION: 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32] marekj Watirloo: Semantic Page Objects in UseCases Human Readable Machine Executable Acceptance Testing http://github.com/marekj/watirloo/ On Fri, Feb 6, 2009 at 12:55 AM, Bret Pettichord bpettich...@gmail.com wrote: See Daniel's advice below. He is the developer of the gems in question. Bret -- Forwarded message -- From: Daniel Berger djber...@gmail.com Date: Thu, Feb 5, 2009 at 7:04 PM Subject: Re: Watir is acting retarded To: ruby-talk ML ruby-t...@ruby-lang.org Daniel Waite wrote: This... NameError: uninitialized constant Windows::API::Error Or this... irb(main):009:0 Watir::IE.new.goto 'google.com' NoMethodError: undefined method `goto' for #Watir::IE:0x32e108c I reinstalled Windows about 4 hours ago. I installed the network card drivers and Ruby via the one-click installer. I then installed the Watir gem. The above error messages are all I'm getting when attempting to use it. I am running as the administrator on this machine. I have registered the AutoIt file manually. Any ideas? Google turns up _nothing_ related specifically to these issues. Surely I cannot be the only person who has encountered this. Yep, you want this combination: win32-api 1.3.0 or later windows-api 0.3.0 or later windows-pr 0.9.9 or later Regards, Dan -- Bret Pettichord GTalk: bpettich...@gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Agile testing book
I've read sample chapters of Gojko's book http://www.acceptancetesting.info/the-book/#samplechapters For those of you at AWTA who were wondering why I was all about 'Language' and 'shared vocaublary' and 'ethnography' and 'dwelling in the domain of the language' etc... this book seems to address a lot of it: a tidbit matching what client expects is essentially a communication problem, not a techical one This ties to Cockburn's drumming on 'language-game' distinctions from Pelle Ehn with Wittgenstein thrown in. Basically: Value is in a conversation. I mean an ongoing-live-conversation not a well-captured one. thanks marekj | Semantic Page Objects Automation Watirloo: Browser Page Helper Framework http://github.com/marekj/watirloo/ for IE, Firefox and others? On Wed, Jan 21, 2009 at 9:21 AM, Charley Baker charley.ba...@gmail.comwrote: Lisa, I'm more than happy to support the authors, so I did order a copy and will add my review on Amazon. :) After leafing through it at AWTA, I'm really excited to read it. The mind maps for the chapters is one of the coolest things I've seen. Sai, Also ordered a copy of Gojko's book as well. There must be something in the Watir, having a few great authors on this mailing list. :) -Charley On Tue, Jan 20, 2009 at 9:43 PM, sai saidesertrose2...@gmail.com wrote: Cool.. I am planning to buy one. As well Gojko's book on Bridging the communication gap is also good. Regards, Sai http://code.google.com/p/chrome-watir http://code.google.com/p/flash-watir On Jan 21, 9:04 am, Charley Baker charley.ba...@gmail.com wrote: Hi all, There are a few books that I recommend having on your shelf, this is one. I've just ordered this book, and am looking forward to reading it. http://www.amazon.com/Agile-Testing-Practical-Addison-Wesley-Signatur... This looks to be an interesting book. Ping me for book recommendations on various topics. -c --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Framework
Thanks Charley for mentioning watirloo I've now moved it to github and integrated hoe and newgem see: http://github.com/marekj/watirloo download and run: rake -T for all hoe tasks including gem installation This is very skeletal work but time permitting I will keep expanding. Thanks marekj | Semantic Page Objects Automation Watirloo: Browser Page Helper Framework http://www.github.org/marekj/watirloo for IE, Firefox and others? On Sat, Dec 27, 2008 at 11:44 PM, Charley Baker charley.ba...@gmail.comwrote: There are also some frameworks built around watir which you might take a look at, here are a couple of links: - Watirloo: http://github.com/marekj/watirloo/tree/master - Taza: http://github.com/scudco/taza/tree/master - Cucumber - the next generation of RSpec story runner, Aidy also posted an example on google groups earlier today: http://github.com/aslakhellesoy/cucumber/wikis - Rasta - http://rasta.rubyforge.org/ - Some various information on the wiki under frameworks and advanced examples: http://wiki.openqa.org/display/WTR/Examples - A presentation on a keyword driven framework using Watir: http://www.slideshare.net/nivetha/keyword-driven-framework-using-watir A few of these frameworks are developed by some of us on this list. HTH, Charley Baker blog: http://charleybakersblog.blogspot.com/ Project Manager, Watir, http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Fri, Dec 26, 2008 at 6:15 PM, Anna Gabutero a...@lavabit.com wrote: On Fri, Dec 26, 2008 at 10:19:29AM -0800, watirpuppy wrote: I think the core framework(s) are: test-unit rspec both gems to install in your ruby environment. Test::Unit is a standard ruby library. There's no need to install it as a gem. - Anna --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: attach method
The Watir::IE.attach class method has not moved. it's still in the same place FireWatir::FireFox.#attach instance method has not moved. it's still in the same place. Browser.#attach module method does not exist yet. Bret has an attach branch of code if you want to investigate it http://svn.openqa.org/svn/watir/branches/attach/ I see it here: http://svn.openqa.org/svn/watir/branches/attach/commonwatir/lib/watir/browser.rb on the other hand I have made a Firefox.attach class method for watirloo tests. it's a hack to unify interface to Watirloo tests. use at your own caution. http://www.bitbucket.org/marekj/watirloo/src/tip/lib/firewatir_ducktape.rb and I'll move watirloo to git this week and make it a gem too (given some extra free time) marekj | Semantic Page Objects Automation Watirloo: Browser Page Helper Framework http://www.bitbucket.org/marekj/watirloo/ for IE, Firefox and others? On Mon, Dec 22, 2008 at 9:47 AM, aidy lewis aidy.le...@googlemail.comwrote: Hi, Can anyone tell me where the attach method now exists? Aidy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: object map
Is this what you mean by object man? A wrapper accessor method to a DOM control? http://www.bitbucket.org/marekj/watirloo/src/tip/test/select_list_as_face_test.rb marekj | Semantic Page Objects Automation Watirloo: Browser Page Helper Framework http://www.bitbucket.org/marekj/watirloo/ for IE, Firefox and others? On Mon, Dec 15, 2008 at 12:07 PM, aidy lewis aidy.le...@googlemail.comwrote: Hi, Is anyone still use an object map? def project_action_dropdown browser.select_list(:id, /ProjectListControl_ddlActions/) end project_action_dropdown.select(aaa) I found it highly cumbersome and timeconsuming and felt I didn't really need it when using RegEx. What are other's opinions? Aidy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Need to access the first LI element within an UL element
On Fri, Dec 12, 2008 at 12:09 PM, Bret Pettichord b...@pettichord.comwrote: /Signed in as (.*)/.match(browser.ul(:id, 'ulInfoLinks').li(:index, 1).text)[1] nice usage of MatchData captures woot! bret +1 best, marekj Natasha wrote: Hi All, I want to access the value of the LI element, which is within an UL element. Following is the HTML structure: UL class=inline id=ulInfoLinks LI Signed in as STRONG username /STRONG /LI LI /LI /UL Basically I want to retrieve the name of the user that is logged in. Thanks, Natasha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: set watir_browser=ie is not working
On Thu, Dec 11, 2008 at 6:14 PM, Margam nk.mar...@gmail.com wrote: Hi John, So I tried using require 'watir/browser' in my script and set watir_browser=ie from command prompt and everything is OK. IE is opened and the scripts runs fine. But when I type set watir_browser=firefox from command prompt and run the script, IE is still used. Firefox is not launched. Am I doing something wrong. one of two things may be happening: 1) I wonder if you are using two cmd terminals. The problem with set command on windows is that the whatever you set lasts only for the duration of the process you are running in that one terminal window. So if you set watir_browser=firefox in terminal window 1 and run ruby script in terminal window 2 it will not know to run it on firefox. 2) or when you type set watir_browser=firefox you can' t have any spaces so the following is incorrect 'set watir_browser = firefox' marekj Also for the time being I am doing to just change the default browser from the script itself (which works fine). Thank you Margam On Dec 11, 9:46 am, John Fitisoff jfitis...@yahoo.com wrote: I think the problem is that you are requiring watir rather than watir/browser. Something like this should work: require 'rubygems' require 'watir/browser' set watir_browser=ie browser = Watir::Browser.new browser.goto(http://www.hotmail.com;) --- On Wed, 12/10/08, Margam nk.mar...@gmail.com wrote: From: Margam nk.mar...@gmail.com Subject: [wtr-general] set watir_browser=ie is not working To: Watir General watir-general@googlegroups.com Date: Wednesday, December 10, 2008, 4:45 PM HI All, I am trying to write one script that will work on both IE and FF. As per the link: http://wiki.openqa.org/display/WTR/Browser.new I am trying to use the set watir_browser=ie command and Watir::Browser.new The code is : -- require 'rubygems' require 'watir' set watir_browser=ie browser = Watir::Browser.new browser.goto(http://www.hotmail.com;) -- But keep getting the following error: - undefined method `set' for main:Object (NoMethodError) - What am I doing wrong? Should I require any other library? Thank you. Margam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: 'no such file to load' when running firewatir unit test
Jason, The unittests are not designed to be run after gems are installed. all unittests are desing to run in Development mode - you need to check out the source from SVN and run the unittests on trunk This is a known issue, and unittests should probably not be packaged into gems. more here; http://wiki.seleniumhq.org/display/WTR/Running+Unit+Tests+in+Development and in release notes marekj | Semantic Page Objects Automation Watirloo: Browser Page Helper Framework http://www.bitbucket.org/marekj/watirloo/ for IE, Firefox and others? On Mon, Dec 1, 2008 at 10:30 AM, Jason [EMAIL PROTECTED] wrote: I am using Ruby version 1.8.6 and Firewatir version 1.6.2 in Windows XP. I installed firewatir using 'gem install firewatir', but when I try to run the included unit tests, mozilla_all_tests.rb, I get the following error: c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_re quire': no such file to load -- unittests/setup/lib (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:in `re quire' from C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/unittests/ setup.rb:1 5 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:in `ge m_original_require' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:in `re quire' from C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/unittests/ mozilla_al l_tests.rb:3 I am able to run all the sample tests in Watir 1.6.2 just fine. From what I've read on the message board, this error seems to indicate that firewatir was not installed properly, but I don't see I could've screwed up typing 'gem install firewatir'. I am very new at this, any help would be appreciated. - Jason --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: 1.6.2 - browser.attach question
Lisa, I've encountered a smiliar problem. The issue is that IE has a class method .attach but not an instance method (not needed in my opinion) However FireWatir::Firefox.attach is only an instance method so you can only attach to the browser if you have an existing reference. If you are using IE then the solution is to keep using Watir::IE.attach how, what for your needs (notice this may not run if you don't have admin rigths). Ultimately the goal is to make Browser class be the template that has methods that specific browsers implement so if you do Browser.attach and your browsder is IE it will delegate to IE.attach and if you have firefox it will do Firefox.attach (which does not exist yet) I'm learning this thing a bit and I made some ducktape experiments here with tests (older example) http://gist.github.com/26693 and here (newer example) on watirloo codebase http://www.bitbucket.org/marekj/watirloo/src/tip/lib/firewatir_ducktape.rb I am now using Firefox.new :attach = true option call to just attach to the previously started FF with jssh option in it. This is a hack and has to be understood before using it. currently all watirloo tests will run on IE and Firefox (though some will fail on FF - i need to fix them) all the tests rely on class method attach for Firefox and for IE This file will run all test for firefox with precondition that you have started ff with jssh already and you have it open on the desktop http://www.bitbucket.org/marekj/watirloo/src/tip/test/test_all_ff.rb hope this helps a bit. marekj | Semantic Page Objects Automation Watir Framework http://www.bitbucket.org/marekj/watirloo/ On Fri, Nov 28, 2008 at 4:58 PM, Lisa Crispin [EMAIL PROTECTED]wrote: Another question - on the development site you say: Watir 1.6.2 does not support Browser.attach. This will be supported in a future version. We use Browser.attach when we run our tests in a suite. What are we supposed to do instead, since Browser.attach isn't supported in 1.6.2? Or does this mean we can't use 1.6.2 at all? It seems weird that you couldn't run suites, there must be a way to do it that I just don't know about. Thanks, Lisa On Thu, Nov 13, 2008 at 11:06 AM, Bret Pettichord [EMAIL PROTECTED]wrote: i've added the require statement to the enabled popup script itself, so this workaround will not be required with the next version of watir jpweston wrote: Thanks for this and your explanation in the Uninitialzied Constant post. j. On Nov 12, 9:17 pm, Bret Pettichord [EMAIL PROTECTED] wrote: the solution is to add require 'watir/ie' to your script jpweston wrote: After installing WATIR 1.6.2, scripts that have the following line: require 'watir/contrib/enabled_popup' are causing the following error: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/contrib/ enabled_popup.rb:5: uninitialized constant Watir::PageContainer::Win32 (NameError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' Here is what I have at the top of my scripts: require 'test/unit' require 'ci/reporter/rake/test_unit_loader.rb' require 'watir' require 'watir/testcase' require 'watir/contrib/enabled_popup' class TC_sales_tests Watir::TestCase include Watir code end Can someone point me toward what I am doing wrong here? These scripts worked with the version of 1.5 that I had installed. Thanks. Johnathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Problem of attach function in firewatir
When you click 'login' button what happens? is there another window, popup or something first? marekj | Semantic Page Objects Automation Watir Framework http://www.bitbucket.org/marekj/watirloo/ On Wed, Nov 26, 2008 at 10:00 AM, Jarod Zhu [EMAIL PROTECTED]wrote: Hi All, I am using firewatir-1.6.2 to build a web automation framework. During the development, I met one problem that when I used FireWatir::Firefox instane to login our web page, I have to attach the page again browser again so that I can click the object in logined page. The code looks like this * ff = FireWatir::Firefox.new ff.goto(my_web_url) ff.text_field(:id, txt_login).set(username) ff.text_field(:id, txt_password).set(password) ff.button(:id, btn_login).click sleep 5 ff.attach(:title, page_title) # without this step, ff.link (:id,'logout_link_') can't be found ff.link(:id,'logout_link_').click * Actually the page is not a new popup window, and if I use Watir::IE instead, attach is not necessary. Is there anyone know the reason? Thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Improving watir scripts efficiency and making them modular
Here is a list of examples and frameworks for Watir http://wiki.seleniumhq.org/display/WTR/Examples marekj | Semantic Page Objects Automation Watir Framework http://www.bitbucket.org/marekj/watirloo/ On Tue, Nov 18, 2008 at 12:05 PM, Natasha [EMAIL PROTECTED] wrote: Hi All, I am planning to improve test scripts structure. Currently I have only automated sanity test cases using WATIR. These are independant scripts which execute the test cases. I have ported them to Watir 1.6.2, so that I can execute them using both IE and Firefox. But I want to enhance them. Lot of things are hardcoded in it like some login/passwords and text that I type in text fields. I used to execute them individually. Following things are on my mind: 1. Write a wrapper script which executes some or all of my tests. 2. Inculde logging so that tests log the info/error level logging to a file for reference 3. Have some kind of exception handling. It a particular test fails, it should go ahead and execute other tests 4. Have some kind of web interface using which I can execute my scripts, even remotely. It would be great if you could suggest me some links for reference, for any/all of the above queries. I also try to read the postings in this group to get to know about the various approaches. Since this is the first time I am working on website automation, any pointers will be helpful. Thanks, Natasha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: What Watir uses to control the browser?
On Mon, Nov 17, 2008 at 9:52 AM, Xuan Ngo [EMAIL PROTECTED] wrote: What Watir uses to control the browser? Is it like Selenium, it uses JavaScript to control the browser? Xuan. magic, and some more magic But for IE we connect to COM object and for Firefox we connect with JSSH (javascriptt shell telnet session) but all flows through Watir and its elegant human comprehensible API but if you feel a need for raw sushi like experience you can always telnet localhost 9997 to talk to ChromeWindow or XULElmenent cheers. marekj | Semantic Page Objects Automation Watir Framework http://www.bitbucket.org/marekj/watirloo/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] how to attach to Firefox browser
Need help understanding something. My main way of attaching to an already existing window for IE is: browser = Watir::IE.attach how, what it returns a ref to IE and I can continue with my tests without starting any new windows. It allows me to stop tests. setup some conditions manually and continue tests from that known context. 1) how do I do the same behavior with Firefox? It seems I have to start Firefox every time with new or start but when the script ends I can't attach back to the same window. it looks like the attach method does not attach to the browser but binds popup as belonging to the main browser. ideas? marekj | Semantic Page Objects Automation Watir Framework http://www.bitbucket.org/marekj/watirloo/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: firewatir 1.6.2 does not support chinese characters?
On Mon, Nov 10, 2008 at 6:30 AM, Yohei [EMAIL PROTECTED] wrote: I posted similar issue while ago, but with no response. When I looked at the firewatir code, it seemed like underlying jssh protocol can't handle the multibyte character properly. As far as I can see there is not much you can do from watir/ruby side... This is unfortunate for international users. FYI. this issue is identified on Wiki as limits of JSSH. http://wiki.openqa.org/display/WTR/Firewatir+Compatibility -- marekj www.testr.us | semantic test objects modeling in watir --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---