[wtr-general] Re: Reading values in a field

2009-03-10 Thread SQAPro
three things: 1) fix the typo.. ie.test_field will give you an undefined method error.. (heh I make that same typo myself a LOT.. my fngers like to type 'test' instead of 'text' go figure) 2) you are missing a colon in front of 'name' the format for these things is always

[wtr-general] Re: to click a button with Onclick as its attribute

2009-03-10 Thread SQAPro
If all else fails you can use :index usually to identify an element as the nth occurance of that element on the page. Personally I REALLY hate doing that because it's one of the most fragile things you can do other than using specific x,y coordinates and almost always results in code that

[wtr-general] Re: to click a button with Onclick as its attribute

2009-03-10 Thread SQAPro
FYI 'onclick' isn't a property of the button.. it's a javascript event type, in this case it's defining what actions the java code is to take when the event occurs (e.g. when the button is clicked) You can't use that as a means to identify the button. On Mar 10, 3:45 am, Nagu

[wtr-general] Re: Read value from a field

2009-03-10 Thread SQAPro
pretty sure that's what I just told him in another thread here a few hours ago.. On Mar 10, 11:29 am, Tiffany Fodor tcfo...@comcast.net wrote: If you're trying to get the value from a text field: my_text = ie.text_field(:name, 'text field name').value -Tiffany On Mar 10, 12:22 pm,

[wtr-general] Re: Read value from a field

2009-03-10 Thread SQAPro
Did you correct the typo and syntax error I noted in the other thread? What exact error are you getting What exact code are you trying to use? See my comments in the other thread about usng interactive ruby to troubleshoot stuff like this Have you worked through the watir tutorial? it has

[wtr-general] Re: Help Object repository

2009-03-06 Thread SQAPro
On Mar 5, 8:43 pm, Vikas Tulashyam vtulash...@gmail.com wrote: Hi, You are right, Watir doesn't support object repository concept and even you can't spy the object properties. IMHO that's not accurate at all. Watir is not DEPENDENT on an object repository, as are some other tools. it

[wtr-general] Re: clicking on a link, with certain parameters changing every time

2009-03-05 Thread SQAPro
I think you have a few potential solutions 1) talk to your developers about making this thing more testable, e.g. assign something like an ID or Name value to that link in the HTML, it won't be visable on the page, but it would make it easier to select the right link. I don't know your app, but

[wtr-general] Re: undefined method `link' for nil:NilClass

2009-03-03 Thread SQAPro
I should think the latest released version of each would work well. one warning regarding Ruby's unit testing framework, it presumes that unit tests are all fully independant, and can be run in pretty much any order or in complete isolation from one another. Ruby runs the tests not in the order

[wtr-general] Re: Object as parameter

2009-03-02 Thread SQAPro
Having had the weekend to ponder this, it occurs to me, am I guilty of slipping into pre-oop thinking? by trying to create what amount to 'functions' instead of teaching objects how to act on themselves? Should I be doing something like subclassing the watir browser class and adding my methods

[wtr-general] Re: How to open firefox window using Watir when my IE is a default browser

2009-02-27 Thread SQAPro
see this page for more details on ways to set or change the default browser http://wiki.openqa.org/display/WTR/Browser.new On Feb 27, 7:56 am, George george.sand...@gmail.com wrote: This seems to work for me: require 'watir' Watir::Browser.default = 'firefox' $browser =

[wtr-general] Re: Object as parameter

2009-02-27 Thread SQAPro
I'm having a similar issue, I'm pretty sure it's scope related, but I can't wrap my head around what I need to do to fix it. My longterm intent is to move a bunch of frequently called methods, such as logging in a user, off into a seperate file (or module?) but my first attempt at this is

[wtr-general] Re: Creating and using method

2009-02-27 Thread SQAPro
this might seem a bit harsh, but it seems to me (to mangle a metaphor) you are telling us that you are trying to learn how to fish, but then asking us to give you fish directly, instead of perhaps say asking for help with baiting the hook. Why don't you tell us what you've tried in terms of