Tom,
If you try to execute each line of your script through irb, what kind of
results are you seeing? I was able to execute your script without issue on
my machine here (Windows 7, Ruby 1.8.6, Watir 1.6.5). Part of me is
wondering if what you're running into is some sort of permissions issue.
He
Sorry if this is a repeat, but I did search for this issue and didn't
find it. I'm a novice at both Ruby and Watir, as well.
I have a very simple script (part of a much larger script that I'm
trying to resurrect):
require "watir"
browser = Watir::Browser.new
browser.goto("http://202.36.68.44/";)
Thanks to Željko and the rest of the Watir team for your confidence in
me. I'm honored to be counted among such a great group of people.
I'll do my best not to let it go to my head. ;-)
-Tiffany
On Dec 10, 3:50 pm, Željko Filipin
wrote:
> Watir team had a little chat and we decided it would
Agreed.
Thanks so much for all help in this matter - to everyone.
On Dec 11, 9:44 am, Željko Filipin
wrote:
> On Thu, Dec 10, 2009 at 11:34 PM, bender25 wrote:
> > I guess it comes down to which one provides the best efficiency?
>
> I doubt you would see any significant difference if you benchm
Watir team had a little chat and we decided it would be a good idea to grow.
I am glad I can announce that Tiffany Fodor and Wesley Chen have accepted to
be added to Watir community team with title of Support Sheriff:
http://watir.com/team/
Tiffany answers a lot of questions and Wesley is helpin
On Thu, Dec 10, 2009 at 11:34 PM, bender25 wrote:
> I guess it comes down to which one provides the best efficiency?
I doubt you would see any significant difference if you benchmark both
methods (but I could be wrong). I prefer Ethan's code, there is just less
code there.
There's no code like n
> Do you know how to keep these nil entries out of the image collection?
expand_images.compact (assuming expand_images is an array)
This email message and any attachments are for the sole use of the intended
recipients and may contain proprietary and/or confidential information which
may be pri
Thanks all for the responses. I like the rescue nil trick, never thought of
that.
Alan
-Original Message-
From: watir-general+ow...@googlegroups.com
[mailto:watir-general+ow...@googlegroups.com] On Behalf Of b...@pettichord.com
Sent: Tuesday, December 08, 2009 6:35 PM
To: Watir General
Ethan and Željko,
Both of your methods have worked for me.
I guess it comes down to which one provides the best efficiency?
On Dec 11, 9:10 am, Ethan wrote:
> element collections extend Enumerable, don't they?
> so
>
> expand_images = browser.images.select do |image|
> image.alt =~ /^expand/
element collections extend Enumerable, don't they?
so
expand_images = browser.images.select do |image|
image.alt =~ /^expand/
end
should work, and not have nils
On Thu, Dec 10, 2009 at 17:07, Željko Filipin wrote:
> On Thu, Dec 10, 2009 at 10:59 PM, bender25 wrote:
> > Do you know how to ke
On Thu, Dec 10, 2009 at 10:59 PM, bender25 wrote:
> Do you know how to keep these nil entries out of the image collection?
expand_images_and_nils = browser.images.collect do |image|
image if image.alt =~ /^expand/
end
expand_images = expand_images_and_nils.compact
More information:
http://ww
That's great - thanks Bill! I picked up Everyday Scripting with Ruby
a while back to supplement and see how other people were using it
practically, but it wouldn't hurt to have O'Reilly on hand as well.
Thanks again,
Adam
On Dec 10, 3:39 pm, Bill Agee wrote:
> As for what it's called, various R
On Thu, Dec 10, 2009 at 1:03 AM, Tiffany Fodor wrote:
> Would it be possible to add an audio pronunciation like they do at
> dictionary.com on watir.com?
Done.
Željko
--
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, sen
On Thu, Dec 10, 2009 at 7:19 PM, Tiffany Fodor wrote:
> If I'd read the entire thread more carefully, I would have noticed
> that you had the same great idea:
Until I catch Bret to say that, I will use the link you have provided. :)
Željko
--
You received this message because you are subscribe
Thanks Željko,
This syntax did run fine, I did however notice a strange result.
The image collection returned contains a nil entry per image on screen
where the alt tag did not match the regular expression.
This adds overhead to my iteration over the collection - by needing to
check if the curre
As for what it's called, various Ruby guides use the name "variable-length
argument lists". There's some good info online:
http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Variable_Length_Argument_List.2C_Asterisk_Operator
http://ruby-doc.org/docs/ProgrammingRuby/html/tut_method
Basic application:
I currently have a function in almost every script that is screaming
to be stripped out and put into a global helper.rb file. At the end
of a series of tests, it sends me an email and parses the errors I've
collected stored in the array $errors. This works well, except that
som
i think the each is done by including enumberable (
http://ruby-doc.org/core/classes/Enumerable.html) module ( it was way back
anyway), so any methods in the enumberable module should just work:
ie.buttons.each_with_index do |button, i|
puts "index for bytton with id #{button.id} is #{ i + 1
If I'd read the entire thread more carefully, I would have noticed
that you had the same great idea:
> Maybe we should record Bret saying something like this. :)
> http://www.paul.sladen.org/pronunciation/
Sorry about that! :)
-Tiffany
On Dec 10, 3:39 am, Željko Filipin
wrote:
> On Thu, Dec
when poking around at the page, trying to find attributes of UI
elements, it's incredibly useful to open your webpage, start irb, get
a new Watir::IE using attach, then just play around with
puts $ie.buttons[1]
puts $ie.links[12]
etc
On Dec 9, 8:20 pm, Marlon wrote:
> Hi,
>
> How can I easy get b
On Thu, Dec 10, 2009 at 3:17 PM, arihan sinha
wrote:
> now i need to validate that powerpoint which opened in the browser by
checking the text/link on that.
I do not think Watir can test powerpoint files opened in browser. It is
probably using a browser plugin for that and Watir can not automate
Hello Tiffany,
Thanks you for your answer.
In fact, that's work if i add the lines code in my program with ruby
1.6.5
require "win32ole"
WIN32OLE.codepage = WIN32OLE::CP_ACP
Best Regards,
Fabien
On 10 déc, 00:36, Tiffany Fodor wrote:
> Hi Fabien!
>
> There was a change in 1.6.5 to use UTF-8
On Thu, Dec 10, 2009 at 3:20 AM, Marlon wrote:
> How can I easy get button index?
counter = 1
browser.buttons.each do |button|
puts "index:#{counter}"
puts button.to_s
puts
counter += 1
end
Please let me know if you would like me to comment the code.
Željko
--
watir.com - commun
I would like to put new rdoc at http://watir.com/rdoc
How to generate new rdoc, since now we have three gems?
Should I clone git://github.com/bret/watir.git and create rdoc from there or
should I create separate rdoc for each gem?
C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.5>rdoc
C:\ruby\lib\ruby\
On Thu, Dec 10, 2009 at 1:03 AM, Tiffany Fodor wrote:
> http://dictionary.reference.com/browse/water (see the speaker icon
> next to the word 'water')
Great idea. :) I will add it to the web site.
Željko
--
You received this message because you are subscribed to the Google Groups
"Watir Gene
On Wed, Dec 9, 2009 at 7:51 AM, chethan sarathy
wrote:
> Here is the solution for Ruby Installation & Updating the Gems.
Chethan,
Thank you for letting us know how to fix it.
Željko
--
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to
26 matches
Mail list logo