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
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
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
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,
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
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
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
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
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
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 =
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
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
12 matches
Mail list logo