[wtr-general] Getting each value in excel and converting it while doing it

2009-02-03 Thread magnujf
Hello, I want to get some values from a range in Excel using WatiR. Here is my range: pnr = worksheet.Range(i2:i4).Value First I wonder how I could remove decimals i.e. convert all these values during the execution of the code above. Using to_i gives me the error that the method does not

[wtr-general] Re: NoMethodError: undefinied method 'goto' for # Watir::IE:0x3294480

2009-02-03 Thread anna barbara ostrowska
Yes, sure Loaded suite All Tests Started EE Finished in 0h 0m 0s 1) Error: test_send_public_gift(TC_Send_Private_Gift): NoMethodError: undefined method `goto' for #Watir::IE:0x3294480 C:\Documents and Settings\anna\Desktop\ruby\Gifts/Wayn/user.rb:12:in `login' C:\Documents and

[wtr-general] Re: NoMethodError: undefinied method 'goto' for # Watir::IE:0x3294480

2009-02-03 Thread aidy lewis
#How about this require 'watir' class Browser def initialize @browser ||= Watir::IE.new @browser.speed = :zippy @browser.bring_to_front @browser.maximize end def close @browser.close puts we have closed the browser end #watir methods not in Browser fall into

[wtr-general] Re: NoMethodError: undefinied method 'goto' for # Watir::IE:0x3294480

2009-02-03 Thread anna barbara ostrowska
There is require 'watir' --- require 'watir' class BrowserFactory def BrowserFactory.create browser = Watir::Browser.new begin browser.speed = :zippy browser.bring_to_front rescue NoMethodError end

[wtr-general] Re: Unable to enter integer value in a text_field

2009-02-03 Thread John Kolokotronis
Since you want everything as a string (both numbers and strings), why bother with the to_i conversion to get rid of the decimals? I'd just do this: x=w.application.cells(row_count,col_count)['value'] x.to_s.gsub(/\.\d+/, ) # This will remove anything like .00, . 12345, etc... and leave you with

[wtr-general] exists? with multiple identifiers

2009-02-03 Thread Moochie
get_button_properties(button_name) Case button_name when Add Dependent button_id = $ie.div(:id,TB_ajaxContent).button (:id,addDependent_submit) end return button_id end #Start of code object_id = get_button_properties(Add

[wtr-general] Re: exists? with multiple identifiers

2009-02-03 Thread Moochie
Got it! require 'test/unit/assertions' include Test::Unit::Assertions get_button_properties(button_name) Case button_name when Add Dependent button_id = $ie.div (:id,TB_ajaxContent).button(:id,addDependent_submit) end return

[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click

2009-02-03 Thread Bret Pettichord
Of course you are right. The patch was attached to this email: http://rubyforge.org/pipermail/wtr-development/2009-January/000400.html It seems like this has not been put into Jira yet. Bret lokesh.agra...@gmail.com wrote: I applied the patch but still the same issue. This patch is for

[wtr-general] Re: NoMethodError: undefinied method 'goto' for # Watir::IE:0x3294480

2009-02-03 Thread Bret Pettichord
Not sure. I did notice that you have some other method calls to the browser where you are trapping the NoMethodError. Why are you doing that? Also, it might help us if you could create a simple script that reproduces this problem. I personally don't have issues with the framework you've

[wtr-general] [OT] Is anyone here successfully posting to the Rspec group?

2009-02-03 Thread John Kolokotronis
Hi All, Apologies for the OT question, but I cannot seem to get any posts on to the Rspec group @ http://groups.google.com/group/rspec - I've joined the group, start a new post and the topic is reported as posted successfully. However, no trace of my posts exist anywhere on the list/ no mails

[wtr-general] Re: Unable to enter integer value in a text_field

2009-02-03 Thread Loft_Tester
I've ran into this in the past as well. The only way is to send it as a string --~--~-~--~~~---~--~~ 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

[wtr-general] IE browser not launching when you instantiate a new version of the browser...

2009-02-03 Thread bwaybandit
Hi, Anyone see this below? This works for Firefox, but when I try to launch IE, seems like I do not get back an instance of the browser. This was working all morning and not sure what has caused this to happen. Has anyone has run into this? (Ruby - 1.8.6 / Watir - 1.6.2) irb(main):006:0

[wtr-general] Re: unit test load order

2009-02-03 Thread Nathan Lane
No, Ruby's unit test infrastructure and similar infrastructures use reflection to get each of the tests' names, which are always returned in alphanumeric order. So if you want your tests to run in a specific order, then you must name them with that in mind. On Tue, Feb 3, 2009 at 7:44 AM,

[wtr-general] Re: unit test load order

2009-02-03 Thread aidy lewis
Unit tests should be independent. I don't think we can make the same assumption about business facing tests. This is another reason why I believe xUnit to be an inadequate narrative for Story Testing. However, if I remember correctly Bret wrote something to re-order Test::Unit methods. Aidy On

[wtr-general] located element but said it couldn't locate it?

2009-02-03 Thread infoDrone
Hey all. Got a weird one here. I am able to use the click method on the following image using its src, class, and alt attributes.: img height=11 width=44 src=images/home/nurses_text.gif class=nursesText alt=Nurses/ However, SciTe output displays the following error after my script completes

[wtr-general] Re: unit test load order

2009-02-03 Thread Bill Agee
You can specify the run order of your cases using a test suite file. Then to launch all the tests, you just execute the suite file. Check out the Test Suite section in the rdoc: http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/ The catch is that (as far as I know) the suite file has to

[wtr-general] Re: Getting each value in excel and converting it while doing it

2009-02-03 Thread magnujf
Hi, Ok, thank you for the tip. At the top (if my cells contain just text) then I can state: bnk = worksheet.Range(g2:g4).Value ? Even if the text are numbers? Any idea how I loop through ranges without knowing how many rows the column consists of? As in bnk = worksheet.Range(g2:g4).Value ?

[wtr-general] Re: IE browser not launching when you instantiate a new version of the browser...

2009-02-03 Thread bwaybandit
Thanks Lisa. After stepping though browser.rb, still could not figure out why I could not get back a good reference to IE. After wasting a few hours, did the unimaginable - re-installed ruby and watir and back to normal. Just un-installing watir did not do the trick. Anyhow, thanks again. Back to

[wtr-general] browser seems to hang sporadically

2009-02-03 Thread Lisa Crispin
Has anyone seen this problem running Watir suites in Vista (64-bit) / IE7? We have a number of Watir suites, plus one big giant suite that includes all the others, the giant one takes maybe 3 hours to run. I ran this giant suite for 3+ years unattended on XP / IE6 without too much trouble - I'd

[wtr-general] Unable to install watir

2009-02-03 Thread arunaprabha...@gmail.com
Hi, 1.Downloaded ruby186-26.exe 2.Installed it 3.got following error when im tried to install watir: C:\Documents and Settings\lagem update --system Updating RubyGems... ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) No connection could be made because the target machine