[Wtr-general] OO framework?

2007-07-12 Thread aidy lewis
Hi, I am concerned about hierarchy. In each class I hold methods relating to a specific HTML page. However, each HTML page does not inherit another by nature. My dilemma is should I inherit through a sequence of actions (i.e. a use-case)? A use-case is not OO. Login = Main_Page = Submit_Page etc

Re: [Wtr-general] OO framework?

2007-07-12 Thread aidy lewis
On 12/07/07, Richard Conroy [EMAIL PROTECTED] wrote: If you have a lot of page-specific methods, chances are there are a few smells going on, and you are missing an opportunity to DRY up common behaviour into libraries. Good point. But any commonality between page objects is extracted into a

[Wtr-general] branches of Watir

2007-07-10 Thread aidy lewis
Hi, Could anyone give or point me to branches of Watir? I currently have: 1. FireWatir - runs tests within FireFox 2. Watij - Java API that is not bound to IE and can run on various operating systems Thanks Aidy ___ Wtr-general mailing list

Re: [Wtr-general] how to install Eclipse plugin for ruby ?

2007-06-29 Thread aidy lewis
Hi, You may have a firewall blocking your plugin download. I think also you need Ruby 182, Eclipse 3.1 to use this plugin. There is a radrails fully configured Eclipse. Have a look: http://www.aptana.com/download_radrails.php Also look at Arachno ruby as well - that is if you do not use the

Re: [Wtr-general] Using Excel

2007-06-22 Thread aidy lewis
On 22/06/07, Daniel Kurtz [EMAIL PROTECTED] wrote: I hear the DataManager library is something of a turkey and will probably be pulled from future distros of Watir. Is there a good Ruby alternative for reading (and writing) Excel files from Watir scripts? Have a look at this:

Re: [Wtr-general] Porting Watir to JRuby

2007-06-17 Thread aidy lewis
Hi, On 13/06/07, Nick Sieger [EMAIL PROTECTED] wrote: On 6/13/07, Nivetha Padmanaban [EMAIL PROTECTED] wrote: Any plans of porting WATIR to JRuby?? None that I know of at the moment. The stumbling block is to get a compatible version of 'win32ole' on JRuby which we don't have. Watij

Re: [Wtr-general] Our contribution to Watir

2007-06-16 Thread aidy lewis
On 16/06/07, Bach Le [EMAIL PROTECTED] wrote: The details can be found at [http://jira.openqa.org/browse/WTR-162|http://jira.openqa.org/browse/WTR-162] There is no project on this URL. Cheers Aidy ___ Wtr-general mailing list

Re: [Wtr-general] instantiate a class that inherits from Test::Unit

2007-06-03 Thread aidy lewis
On 31/05/07, Bret Pettichord [EMAIL PROTECTED] wrote: However, i still have no idea what you are trying to do. Why do you want to instantiate a test case? Hi Bret, Each page has its own class. So for example the Login Class will hold its own object map and methods relating to that page code

Re: [Wtr-general] instantiate a class that inherits from Test::Unit

2007-05-31 Thread aidy lewis
On 30/05/07, Bret Pettichord [EMAIL PROTECTED] wrote: aidy lewis wrote: #Is it possible to instantiate a class that inherits from Test::Unit Yes it is. Why do you ask? Did you try this and run into trouble? What kind of trouble? Hi Bret, If I write this code require 'test\unit' class

[Wtr-general] count number of indexes on a page

2007-05-31 Thread aidy lewis
Hi, Does anyone know how to count the number of indexes on a page? Thanks Aidy ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] count number of indexes on a page

2007-05-31 Thread aidy lewis
On 31/05/07, Ċ½eljko Filipin [EMAIL PROTECTED] wrote: Aidy, What is number of indexes? Zeljko Hi Zeljko I have a number of links with indexes (e.g. index=8). I need to be able to iterate and count the indexes so I can click the last one on the page. Thanks Aidy

[Wtr-general] return data from tablecells?

2007-05-31 Thread aidy lewis
Hi, Is it possible to return data from tablecells? If so, could anyone provide the syntax? Aidy ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] instantiate a class that inherits from Test::Unit

2007-05-30 Thread aidy lewis
#Hi #Is it possible to instantiate a class that inherits from Test::Unit require 'test\unit' class Login Test::Unit::TestCase def username;$ie.text_field(:name, 'username');end def password;$ie.text_field(:name, 'password');end def sign_in;$ie.button(:alt, /Log in/);end def

Re: [Wtr-general] How to send yes to the security certificate

2007-05-22 Thread aidy lewis
On 22/05/07, Koteswara Annavarapu [EMAIL PROTECTED] wrote: but the ie.goto is not stepping further until you clear the certificate. You need to use threads. I will put it on the faqs. code class Browser def initialize $ie = Watir::IE.new end def goto(url) @url = url t =

Re: [Wtr-general] exists? method not working inside my assert - can someone explain?

2007-05-17 Thread aidy lewis
On 17/05/07, Lauren [EMAIL PROTECTED] wrote: Does nobody understand why: $ie.span(:text, title).exists? returns true... But wrapping in assert statement around the same statement then fails? assert($ie.span(:text, title).exists?) Looks OK. Could you send us the test HTML page? aidy

Re: [Wtr-general] Common functions

2007-05-15 Thread aidy lewis
On 15/05/07, Ken [EMAIL PROTECTED] wrote: What is the easiest way for me to re-use this function so that I dont have to include it in every script that i write? You could use Ruby Test::Unit. class Test_Suite Test::Unit::TestCase #the setup method is executed before each test method

Re: [Wtr-general] Solution for FAQ Using key/value pairs not working

2007-05-14 Thread aidy lewis
On 14/05/07, Vipul [EMAIL PROTECTED] wrote: class LoginInput @@userName = Vipul.Goyal end $ie.text_field(:id,txtLoginID).set(LoginInput.userName) I think the OO idea is that the client should not be able to directly access a variable outside a class. code class Login_Input

[Wtr-general] Solution for FAQ Using key/value pairs not working

2007-05-14 Thread aidy lewis
On 14/05/07, Vipul [EMAIL PROTECTED] wrote: class LoginInput @@userName = Vipul.Goyal end $ie.text_field(:id,txtLoginID).set(LoginInput.userName) I think the OO idea is that the client should not be able to directly access a variable outside a class. code class Login_Input

Re: [Wtr-general] Solution for FAQ Using key/value pairs not working

2007-05-14 Thread aidy lewis
On 14/05/07, Charley Baker [EMAIL PROTECTED] wrote: class LoginInput @@user_name = Vipul.Goyal def LoginInput.user_name @@user_name end end puts LoginInput.user_name = Vipul.Goyal # Now with instance: class LoginInput @@user_name = Vipul.Goyal def user_name

[Wtr-general] Community involvement with Watir

2007-05-10 Thread aidy lewis
On 09/05/07, Bret Pettichord [EMAIL PROTECTED] wrote: Just to be clear, we have always been open to having people add these to our wiki and have often encouraged this. http://wiki.openqa.org/display/WTR/Contributions Bret I think all these important links should become a footnote on

Re: [Wtr-general] Community involvement with Watir

2007-05-09 Thread aidy lewis
On 09/05/07, Bret Pettichord [EMAIL PROTECTED] wrote: Just to be clear, we have always been open to having people add these to our wiki and have often encouraged this. http://wiki.openqa.org/display/WTR/Contributions Bret I think all these important links should become a footnote on

[Wtr-general] code structure problem

2007-04-11 Thread aidy lewis
Hi, I have a bit of a code structure problem, I wonder if any-one can help? I instantiate the IE class and assign it to a global object $ie = Watir::IE.new def browser;$ie;end I go through an Object Map using Module constants module Login USERNAME = browser.text_field(:name, 'user_name')

[Wtr-general] .getElementsByTagName

2007-04-05 Thread aidy lewis
Are we all using the DOM method .getElementsByTagName to get for example, a level 2 heading? return document.getElementsByTagName('h2') Should we refactor these methods to make a more abstract method show_labels show_spans show_pres etc? Thanks aidy

[Wtr-general] IE nested class of module watir?

2007-04-03 Thread aidy lewis
Hi, I am unsure why IE is a nested class of the module watir I was thinking of creating this object hierarchy IE ObjectMap Test Inheriting the IE class from the ObjectMap class. aidy ___ Wtr-general mailing list Wtr-general@rubyforge.org

Re: [Wtr-general] little framework

2007-04-02 Thread aidy lewis
#Hi, #This is what I have got, I don't think it is anything new: #each page has a class where objects of that class are mapped class Login def username;$ie.text_field(:name, 'user_name');end def password;$ie.text_field(:name, 'password');end def remember_me;$ie.checkbox(:name,

Re: [Wtr-general] little framework

2007-03-28 Thread aidy lewis
Hi Paul, Could you just please explain how you are mapping something like this: text_field :user_name , :id='username' in the parent class? cheers aidy ___ Wtr-general mailing list Wtr-general@rubyforge.org

[Wtr-general] little framework

2007-03-27 Thread aidy lewis
Hi, Could anyone give me some feedback on this? Each HTML objects exists in a module snip module Field MAP_FIELD = Hash.new {|h,k| k}.update( 'username' = 'login', # gui name = HTML name 'password' = 'password' ) def Field.set(name,args) $ie.text_field(:name,

Re: [Wtr-general] little framework

2007-03-27 Thread aidy lewis
to firefox, or do something different with the browser. Paul - Original Message - From: aidy lewis [EMAIL PROTECTED] Date: Tuesday, March 27, 2007 9:56 am Subject: [Wtr-general] little framework Hi, Could anyone give me some feedback on this? Each HTML objects exists

Re: [Wtr-general] little framework

2007-03-27 Thread aidy lewis
Paul Rogers says the ParentClass would have methods to validate that everything is there, the title is correct etc. It also has the code to do the translation of the descrptive name ( eg login_button) to the actual element ( button(:value , 'Login Now!') Very good idea. I have been

[Wtr-general] keyword framework

2007-03-22 Thread aidy lewis
Hi, Has anyone written a simple keyword framework with Watir and would like to share a sample of it? If I remember Phlip may have done something like this. aidy ___ Wtr-general mailing list Wtr-general@rubyforge.org

[Wtr-general] watir faqs

2007-03-21 Thread aidy lewis
Hi, I have been out of the loop for about 5 months. Could anyone tell me if there is still a Watir FAQ Wiki? aidy ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] watir faqs

2007-03-21 Thread aidy lewis
http://wiki.openqa.org/display/WTR/FAQ ? Is this a deprecated site then http://wtr.rubyforge.org/ ? with a faq url of: http://wtr.rubyforge.org/wiki/wiki.pl? cheers aidy ___ Wtr-general mailing list Wtr-general@rubyforge.org

Re: [Wtr-general] Hacking Ruby

2006-11-03 Thread aidy lewis
Bret, Chris are we saying as a community that we are aiming for dsl's with watir? and are we saying that this can only relate to one's own project? aidy ___ Wtr-general mailing list Wtr-general@rubyforge.org

[Wtr-general] Question from a newbie

2006-10-23 Thread aidy lewis
MB writes: Congratulations: you've found a bug. There should not be two text fields with the same ID and the same name on the same page. Not necessarily so; if for example, you look at IBM Portal application architecture, it contains many separate applications (portlets) within a container