Hi Marekj thanks for the quick and informative reply. We are planning to do something very similar to what is stated in ur reply. Encapsulating watir functions from the end user and providing him with a vocab [keywords] to construct his test. did u built any object repository with Watir for the framework?
Also can anyone tell me the difference between these two lines for "http://ireland.hotels.com" ie.document.frames.length works and returns value =2 ie.document.getElementsByTagName("frame") this doesn't returns any value. Also what all tags the method doc.all will not support, like in the code watir.rb they have used .getElementsByTagName for divs, spans, tables etc.. whats the difference there? Please do let me know about it. Thanks. Pallavi. On 7/12/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:
Send Wtr-general mailing list submissions to wtr-general@rubyforge.org To subscribe or unsubscribe via the World Wide Web, visit http://rubyforge.org/mailman/listinfo/wtr-general or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of Wtr-general digest..." Today's Topics: 1. Re: Selecting controls in a dialog box (Matt Berney) 2. Re: Selecting controls in a dialog box (Paul Rogers) 3. Re: Selecting controls in a dialog box (Matt Berney) 4. Keyword driven framework around Watir (Pallavi) 5. How to click a row from table in webpage (SHALINI GUPTA) 6. Re: Keyword driven framework around Watir (marekj) 7. Re: Concurrent Threads and different variables in each thread (marekj) 8. Re: How to pick the last word in the sentence (marekj) ---------- Forwarded message ---------- From: Matt Berney <[EMAIL PROTECTED]> To: wtr-general@rubyforge.org Date: Wed, 11 Jul 2007 12:05:48 CDT Subject: Re: [Wtr-general] Selecting controls in a dialog box It seems like I am having troubles with Ruby v1.8.5 and the modal_dialog support. Should I roll back to 1.8.2-14? I was reading a post by Bret the other day saying that there may be issues with newer versions of Ruby. I am using: ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32] watir 1.5.1.1192 irb(main):006:0* b.modal_dialog.title NoMethodError: IE#modal_dialog not supported with the current version of Ruby (1.8.5). See http://jira.openqa.org/browse/WTR-2 for details. undefined method `connect_unknown' for WIN32OLE:Class from d:/tools/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1192 /./watir.rb:28 27:in `initialize' from d:/tools/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1192 /./watir.rb:32 5:in `new' from d:/tools/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1192 /./watir.rb:32 5:in `modal_dialog' from (irb):6 ---------- Forwarded message ---------- From: Paul Rogers <[EMAIL PROTECTED]> To: wtr-general@rubyforge.org Date: Wed, 11 Jul 2007 11:13:22 -0600 Subject: Re: [Wtr-general] Selecting controls in a dialog box yes, modal dialogs are only supported using that particular version ----- Original Message ----- From: Matt Berney <[EMAIL PROTECTED]> Date: Wednesday, July 11, 2007 11:09 am Subject: Re: [Wtr-general] Selecting controls in a dialog box To: wtr-general@rubyforge.org > It seems like I am having troubles with Ruby v1.8.5 and the > modal_dialog support. Should I roll back to 1.8.2- > 14? I was reading a post by Bret the other day saying that > there may be issues with newer versions of Ruby. > > I am using: > ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32] > watir 1.5.1.1192 > > irb(main):006:0* b.modal_dialog.title > NoMethodError: IE#modal_dialog not supported with the current > version of Ruby (1.8.5). > See http://jira.openqa.org/browse/WTR-2 for details. > undefined method `connect_unknown' for WIN32OLE:Class > from > d:/tools/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1192/./watir.rb:28 > 27:in `initialize' > from > d:/tools/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1192/./watir.rb:32 > 5:in `new' > from > d:/tools/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1192/./watir.rb:32 > 5:in `modal_dialog' > from (irb):6 > _______________________________________________ > Wtr-general mailing list > Wtr-general@rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > ---------- Forwarded message ---------- From: Matt Berney <[EMAIL PROTECTED]> To: wtr-general@rubyforge.org Date: Wed, 11 Jul 2007 12:37:22 CDT Subject: Re: [Wtr-general] Selecting controls in a dialog box No way!!! It works!!! Uninstalling 1.8.5 and installing 1.8.2-15 worked like a champ!!! This required installing gem watir-1192 as well as installing gem win32-process. But other than that, it works just as advertised... ie = Watir::IE.attach(:url,/ticket.aspx/) ie.button(:name,"button").click <== opens modal dialog ie.modal_dialog.select_list(:id,"comboBox").select("item") ie.modal_dialog.text_field(:id,"text").set("Comments") ie.modal_dialog.button(:name,"btnContinue").click Thanks again for all the help!!! ---------- Forwarded message ---------- From: Pallavi <[EMAIL PROTECTED]> To: wtr-general@rubyforge.org Date: Thu, 12 Jul 2007 05:32:32 -0000 Subject: [Wtr-general] Keyword driven framework around Watir Hi First all let me have the privilege of starting the very first discussion here at Google groups :). i am working with Crestech Software Systems and we are trying to build a keyword driven framework around Watir. I am trying to write a function to create an Object repository.. I need some feedback from the group memebers, any advices, experiences, suggestions regarding this issue are more then welcome and looking forward for some divine interventions. Thanks Regards, --- Pallavi Crestech Software Systems. ---------- Forwarded message ---------- From: "SHALINI GUPTA" <[EMAIL PROTECTED]> To: wtr-general@rubyforge.org, [EMAIL PROTECTED] Date: Thu, 12 Jul 2007 11:04:05 +0530 Subject: [Wtr-general] How to click a row from table in webpage Hi all, Please tell me how to click a column of a row of a web page. Regards shalini Gupta ---------- Forwarded message ---------- From: marekj <[EMAIL PROTECTED]> To: wtr-general@rubyforge.org Date: Thu, 12 Jul 2007 00:53:47 -0500 Subject: Re: [Wtr-general] Keyword driven framework around Watir Hi, I've build a simple framework around TestObject modelling at one company. I am in the middle of specifying and building something like that again. It's much easier second time around. What I've found out is that it is useful to model Business Domain Objects with Ruby classes by building some kind of Adapters or facade type pattersn and wire them up to talk to Watir code So for example if a Page has a Query TestObject that has 3 attributes :street, :city, :zip and you can invoke a search with those attributes I would model it like this: class Query < TestObject def set_city end def set_street end def set_zip end def search end end Now I can write many tests by flooding the TestObject with query configurations and searching them. my data model comes first query=[:city, 'Seattle', :street, 'Stoneway', :zip, '99999'] q = Query.new q.set_city(query[:city]) q.set_street(query[:zip]) q.set_zip(query[:zip]) q.search ... then capture search results and do some asserts. By making a Facade using Domain Model vocabulary I can then wire Watir code in it. def set_city(v) $ie.text_edit(:name, "city_str").set(v) end Watir implementation is encapusalted. The tests can be written by anyone who interacts with Domain Model objects. the watir code si written later. Is this something you have in mind? marekj On 7/12/07, Pallavi <[EMAIL PROTECTED]> wrote: > > > Hi > > > First all let me have the privilege of starting the very first > discussion here at Google groups :). i am working with Crestech > Software Systems and we are trying to build a keyword driven framework > around Watir. > > I am trying to write a function to create an Object repository.. I > need some feedback from the group memebers, any advices, experiences, > suggestions regarding this issue are more then welcome and looking > forward for some divine interventions. > > > > Thanks > > Regards, > > --- > Pallavi > Crestech Software Systems. > > _______________________________________________ > Wtr-general mailing list > Wtr-general@rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > ---------- Forwarded message ---------- From: marekj <[EMAIL PROTECTED]> To: wtr-general@rubyforge.org Date: Thu, 12 Jul 2007 00:56:48 -0500 Subject: Re: [Wtr-general] Concurrent Threads and different variables in each thread if you don't join the threads the execution will stop when program exists. On 7/11/07, Jason <[EMAIL PROTECTED] > wrote: > > Ahhh... maybe, just MAYBE, I should try something before I give up and > post. > > This appeared to work: > > > require 'thread' > > require 'watir' > > > > @var1='pickaxe' > > @var2='axepick' > > @var3='pckexai' > > > > def test_google(varvar) > > ie = Watir::IE.start('http://www.google.com'<http://www.google.com%27> > ) > > ie.text_field(:name, "q").set(varvar) > > ie.button(:value, "Google Search").click > > ie.html > > ie.close > > end > > > > a=Thread.new {test_google(@var1)} > > b=Thread.new {test_google(@var2)} > > c=Thread.new {test_google(@var3)} > > a.join > > b.join > > c.join > > It's not pretty, and if I wanted 5 or 20 threads it would mean writing > these lines of code 10 or 40 times. Must be a cleaner way? > _______________________________________________ > Wtr-general mailing list > Wtr-general@rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > ---------- Forwarded message ---------- From: marekj <[EMAIL PROTECTED]> To: wtr-general@rubyforge.org Date: Thu, 12 Jul 2007 01:02:44 -0500 Subject: Re: [Wtr-general] How to pick the last word in the sentence yes, you are right, much nicer to use the specific Array.last It's so nice to call Array ring ring ring Hi Array give me your last element please and Array responds. marekj On 7/10/07, Paul Rogers <[EMAIL PROTECTED]> wrote: > > > I much prefer using > words = sentences.split # or add (' ') to make split on whitespace > explicit. > last_word = words.last > > > ----- Original Message ----- > From: marekj <[EMAIL PROTECTED]> > Date: Tuesday, July 10, 2007 11:40 am > Subject: Re: [Wtr-general] How to pick the last word in the sentence > To: wtr-general@rubyforge.org > > > Hm...how about this: > > > > sentences =<<eof > > some words and more words then some more words and the last one > > word in a > > sentence1. > > Next sentence and more words and the last one word in a sentence2. > > and here too > > and then some more here > > and last word of the last sentence. > > eof > > words = sentences.split # or add (' ') to make split on > > whitespace explicit. > > last_word = words[-1] #last element in Array is your last word > > in a heredoc > > > > take a look at String.split goodness. > > http://www.ruby-doc.org/core/classes/String.html#M000818 > > > > marekj > > > > > > On 7/9/07, sapna < [EMAIL PROTECTED]> wrote: > > > > > > Hi All, > > > > > > Pleas can you help me finding out the last word in the > > sentence displayed > > > on the web page. Have look at the HTML snippet. > > > > > > Regards > > > Sapna > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general@rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general@rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
-- Pallavi Sharma CresTech Software Systems Pvt. Ltd.
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general