Another way to say this is:
t.each {|x| puts x[0]}
I'm enjoying this thread, heres another way. Sans 0!
for element in (t.index(t.first)..t.index(t.last))
puts t[element].first
end
-
Posted via Jive Forums
On 23/01/07, Bret Pettichord wrote:
This is largely because Watir is stupid in this area. We made a bad
design choice with Watir 1.0. We'd now like to make Watir consistent and
start with 0 everywhere (like everything else in Ruby) but this would
raise compatibility issues. We welcome your
Whoever you are, you are FREAKING FUNNY and made an excellent point
here:-)
So, Paul, how many children do you have? Well, my first boy would
be 0, and my second son would be 1, so I guess I have 1 child. Even
the Cat in the Hat's best friends are Thing 1 and Thing 2. I
would have like
Željko Filipin wrote:
We'd now like to make Watir consistent and start with 0 everywhere
(like everything else in Ruby) but this would raise compatibility
issues. We welcome your thoughts in this area.
I vote for start with 0 everywhere.
Here is where you and everyone with an
, January 24, 2007 2:40 pm
Subject: Re: [Wtr-general] undefined method `[]' for nil:NilClass
(NoMethodError) error at the end of array???
Željko Filipin wrote:
We'd now like to make Watir consistent and start with 0
everywhere (like everything else in Ruby) but this would
raise
Paul Rogers wrote:
do we have the ability to vote
'Yes - with no backwards compatability'
'Yes - with backwards compatability'
or 'No'
or just yes or no
I created two sub tickets. Vote for the one you want.
Without backwards compatibility
http://jira.openqa.org/browse/WTR-135
With
On 1/22/07, mi [EMAIL PROTECTED] wrote:
t = [[a, b], [aa, bb]]
0.upto (t.length) { |x|
puts t[x][0]
}
For some reason i'm getting the following error at the end of the loop,
any idea WHY???
0.upto (t.length-1) { |x|
puts t[x][0]
}
should do it, but I think you figured that out.
This is one of those times when I'll never understand why some things in
programming start counting at 1 and some things start counting at 0.
I, too, have several similar loops in some of my scripts, but I opted for
the more readable format of saying:
t.length.times { |x|
puts t[x][0]
}
I
Paul Carvalho wrote:
This is one of those times when I'll never understand why some things
in programming start counting at 1 and some things start counting at 0.
This is largely because Watir is stupid in this area. We made a bad
design choice with Watir 1.0. We'd now like to make Watir
On 1/24/07, Bret Pettichord [EMAIL PROTECTED] wrote:
We'd now like to make Watir consistent and start with 0 everywhere (like
everything else in Ruby) but this would raise compatibility issues. We
welcome your thoughts in this area.
I vote for start with 0 everywhere.
--
Zeljko Filipin
sorry, i keep forgetting that the array starts at 0:-(
mi wrote:
t = [[a, b], [aa, bb]]
0.upto (t.length) { |x|
puts t[x][0]
}
For some reason i'm getting the following error at the end of the
loop, any idea WHY??? a
aa
undefined method `[]' for nil:NilClass (NoMethodError)
Thanks
t = [[a, b], [aa, bb]]
0.upto (t.length) { |x|
puts t[x][0]
}
For some reason i'm getting the following error at the end of the loop,
any idea WHY???
a
aa
undefined method `[]' for nil:NilClass (NoMethodError)
Thanks in advance!
___
Wtr-general
Hi Chintakrindi, You should be able to do this by creating a new WinClicker object: wc = WinClicker.new wc.clickWindowsButton(Microsoft Internet Explorer, OK)-Charley
On 8/8/06, Chintakrindi Meghanath [EMAIL PROTECTED] wrote:
Hi AllI am using the clickWindowsButton to handle window pop ups in my
Add this at the beggining of your script:require test/unit/assertionsinclude Test::Unit::AssertionsOn 3/23/06,
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I want to make assertions in test_myTestCase.
___
Wtr-general mailing list
: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Monday, March 20, 2006 9:09 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Undefined Method Error
David,
That error message indicates that $ie is nil, which is to say, it hasn't
been initialized. It needs
Title: undefined method `add_assertion' for nil:NilClass
Hello watir team,
I tried to use assertion's in my code and had absolutely now success today. I always get following error:
TEST FAILED.undefined method `add_assertion' for nil:NilClass
On 3/21/06, Paatsch, Bernd [EMAIL PROTECTED] wrote:
def
.some code
begin
I suspect your problem is somewhere in here.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
Title: RE: [Wtr-general] undefined method `add_assertion' for nil:NilClass
Still the same after I changed the code to:
def bpVerifyPopupWindowOpen( ieCont, verify) #how, what, framename, verify )
begin
assert( ieCont.contains_text( verify) )
puts(TEST PASSED. Found test string
Title: RE: [Wtr-general] undefined method `add_assertion' for nil:NilCla ss
Now I get:
TEST FAILED.undefined method `include' for (WebAC::BPUtils):WebAC::BPUtils
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Bret Pettichord
Sent: Tuesday, March
] On Behalf Of
Bret Pettichord
Sent: Tuesday, March 21, 2006 6:37 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] undefined method `add_assertion' for nil:NilCla
ss
That's what i needed to see. Make this change...
On 3/21/06, Paatsch, Bernd [EMAIL PROTECTED] wrote:
Still the same
Hello,Im running into a problem I think is a probably a programming error in my part. Here is what Im trying to accomplish: I have script with 2800 lines of code. My test cases in the script have many repeatable steps. For each test case, Im basically
David,
That error message indicates that $ie is nil, which is to say, it
hasn't been initialized. It needs to be assigned in the test_* method
or the initialize method. (Or you need to get fancy, which is what we
do in our unit tests.)
You said that you are trying to structure your test scripts.
Hi folks,
two weeks ago I send a bug to this mailing list about undefined method `document' for nil:NilClass =
Error as you can see below, and no one could help me out.
Ive found the solution. Its
quite simple. You can just launch the sentence written in Watir under your WET
Hi folks,
I've found a weird error using WET and I'm afraid this may be a WET bug (I hope
it's just my fault with code ;-) )
I'm trying to set either a text field and a checkbox that is found in a second
level frame as following:
I apologize in advance if this question has already been asked. I'm
new to the list and the hunting and pecking in the archives didn't
turn up an answer. (Aside: is there a search engine on the archives?)
My problem is I'm getting an error when attempting to do a very simple
assignment to a
Hi Stephanie,
Are you using a released version of Watir 1.4 or something off the SCM
repository?
I was trying to locate the source of the problem from your stack trace:
from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1766:in `assert_exists'
from
Raghu,
I installed 1.4 originally then I overwrote that installation via the
gem. The gem is listed as 1.4.1.
Thanks for looking into this!
Steph
On 8/29/05, Raghu Venkataramana [EMAIL PROTECTED] wrote:
Hi Stephanie,
Are you using a released version of Watir 1.4 or something off the SCM
Hi Stephanie,
This is getting intersting. I just did a gem install of watir myself,
but still
couldn't find the method 'locate' as shown by:
D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3205:in
`locate': undefined
However I got the latest version HEAD version from cvs
repository and that
Raghu,
My simple case works! But I had to replace all the .rb files from the
gem, not just the watir one. I have no idea how I got the CVS version
of Watir installed. Thanks so much for the help!
Steph
On 8/29/05, Raghu Venkataramana [EMAIL PROTECTED] wrote:
Hi Stephanie,
This is
I'm pretty sure than none of the Watir releases included the 'locate'
method -- that is only in head.
When we created the 1.4.1 release, we were careful to only include minor
fixes and updates that we were pretty sure would not break WET (for 1.4).
It may be worth noting that the regular
30 matches
Mail list logo