[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 creat

[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 failin

[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 wrote: > This seems to work for me: > > require 'watir' > Watir::Browser.default = 'firefox' > $browser = Watir::Browser.new > > On Feb 24, 5:2

[wtr-general] Re: slice question

2009-02-27 Thread Darin Duphorn
rid of the "-"? > > > I've tried and a few others > > > puts excel_value.to_s.slice(/#.*|.*|.*|.*#/) > > > Gives me this > > #0|0|0|3# - #0|0|1|3 > > > I'm trying to include the '|' bars in the slice > > > Tha

[wtr-general] Re: slice question

2009-02-27 Thread Ravi
id of the "-"? > > > I've tried and a few others > > > puts excel_value.to_s.slice(/#.*|.*|.*|.*#/) > > > Gives me this > > #0|0|0|3# - #0|0|1|3 > > > I'm trying to include the '|' bars in the slice > > > Thanks > > W

[wtr-general] Re: slice question

2009-02-27 Thread Darin Duphorn
27;m trying to include the '|' bars in the slice > > Thanks What do you want the result to be? __ Information from ESET NOD32 Antivirus, version of virus signature database 3894 (20090227) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com --

[wtr-general] Re: slice question

2009-02-27 Thread Mark Anderson
t; > I'm trying to include the '|' bars in the slice > > Thanks What do you want the result to be? __ Information from ESET NOD32 Antivirus, version of virus signature database 3894 (20090227) __ The message was checked by ESET NOD32 Antivirus. http://ww

[wtr-general] Re: slice question

2009-02-27 Thread Moochie
#0|0|0|3# - #0|0|1|3 excel_value.to_s.slice(/#.*#/) Gives me this #0|0|0|3# - #0|0|1|3 how do I get rid of the "-"? I've tried and a few others puts excel_value.to_s.slice(/#.*|.*|.*|.*#/) Gives me this #0|0|0|3# - #0|0|1|3 I'm trying to include the '|' bars in the slice Thanks On Fe

[wtr-general] Re: Gem Recall Notice: win32-api

2009-02-27 Thread Charley Baker
Actually Dan, I'd like to thank you for the work you, Park and others have done on win32-utils and other projects (rubygems) to help make sure that Windows *is* well represented in Ruby. Obviously several of the gems in win32-utils have provided the Watir community with functionality we wouldn't ot

[wtr-general] Re: Gem Recall Notice: win32-api

2009-02-27 Thread Daniel Berger
On Feb 13, 10:19 am, Bret Pettichord wrote: > For some background on this problem, please see Daniels recent > statement.http://djberg96.livejournal.com/162898.html To make matters worse, Charley Baker has spotted a problem with Hoe causing Rubygems to download the wrong precompiled binary:

[wtr-general] Re: file_field.set hanging with IE8 RC1

2009-02-27 Thread Jarmo Pertman
Maybe change it to: '[REGEXPTITLE:Choose (file|File to Upload)]' This should match Choose file (as before) and Choose File to Upload and not just any Choose window. Anyway, I would recommend regexptitle solution (don't have IE8 myself to test it though). Jarmo On Feb 25, 1:37 am, Alan Ark wrot

[wtr-general] Re: How to change a ruby file into an .exe file

2009-02-27 Thread Jarmo Pertman
Or use rubyscript2exe, which also supports Linux and OSX. You can read more about it from here http://www.erikveen.dds.nl/rubyscript2exe/ On Feb 20, 10:38 am, Wilson Xu wrote: > refer tohttp://rubyforge.org/projects/exerb/project. > > Wilson --~--~-~--~~~---~--~~

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

2009-02-27 Thread John Kolokotronis
You have "browser" on this line: browser=Watir::IE.start("link_name") and then for every other line, you are calling "@browser": @browser.link(:href, ) They are not the same object so you get undefined method errors because you are calling @browser.link on an object that doesn't even exist

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

2009-02-27 Thread George
This seems to work for me: require 'watir' Watir::Browser.default = 'firefox' $browser = Watir::Browser.new On Feb 24, 5:24 am, suri wrote: > Hi > > can any body suggest on this please.. > >       I have IE n Firefoz set up. But i have to use IE as default one. > When i want toopena new window

[wtr-general] Re: NoMethodError: undefinied method 'goto' for #

2009-02-27 Thread JArkelen
I solved the problem by doing a "gem uninstall win32-api" first, and then to install it again with "gem install win32-api". What I noticed was that there were 2 versions of win32-api installed. I removed them both. On Feb 27, 1:32 pm, JArkelen wrote: > I have the same problem: I have 2 vmware im

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

2009-02-27 Thread Smita Godbole
Hi, I am having following undefined method link for nil:NilClass error. here is my code require "test/unit" require "Watir" require "rubygems" class MyTest < Test::Unit::TestCase browser=Watir::IE.start("link_name") def test_Updateyourinformation @browser.link(:href, "Pr

[wtr-general] Re: NoMethodError: undefinied method 'goto' for #

2009-02-27 Thread JArkelen
I have the same problem: I have 2 vmware images with the exact same setup. I try to run this test: require 'rubygems' require 'watir' Watir.options_file = 'c:\\temp\\options.yml' browser = Watir::Browser.new browser.goto "http://www.cnn.com"; browser.close It works on one image, the other image

[wtr-general] Re: Open a file line by line togo...

2009-02-27 Thread neonoe
Thank you John. It works well. I think i have to learn ruby... Alexandre --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Befor

[wtr-general] Re: Open a file line by line togo...

2009-02-27 Thread John Kolokotronis
The problem is that you are using File.open to open the file, which gives you a file object, not an array of the contents - which I assume is what you want to do since you are then using an each do block... Just use File.readlines instead, like this: File.readlines("file.txt").each do |link| ff

[wtr-general] Open a file line by line togo...

2009-02-27 Thread neonoe
Hi, i have a strange problem: i have a file.txt with urls line by line. require 'rubygems' require "firewatir" ElementCollections.send(:include, Enumerable) #include the FireWatir Module. include FireWatir # open the FF browser ff=Firefox.new File.open("file.txt").each { |link| ff.goto(link) }