Re: [Wtr-general] OT: find min/max values in an array of floats

2007-05-09 Thread Chris McMahon
Neat. I guess I should have just written the code and tried it out. On 5/8/07, Bret Pettichord [EMAIL PROTECTED] wrote: Chris McMahon wrote: I can think of a couple of ways to do this, but they're all painful in one way or another. Ruby being Ruby, I wonder if there's some nifty

Re: [Wtr-general] OT: find min/max values in an array of floats

2007-05-09 Thread Bret Pettichord
Chris McMahon wrote: I can think of a couple of ways to do this, but they're all painful in one way or another. Ruby being Ruby, I wonder if there's some nifty shortcut. Given floats = [] floats 3.456 floats 1.53 floats 5.123 show that the least element of the array is 1.53 and the

Re: [Wtr-general] FireWater: click on link should launch new page/tab, but does not

2007-05-09 Thread Chris McMahon
Close enough. It seems like when you do Apple-R in TextMate, TextMate doesn't capture stderr, only stdout. When I ran the script from IRB, I got irb(main):020:0 ff.link(:src, /help/index.cgi?socialtext_documentation).click FireWatir::Exception::UnknownObjectException: Unable to locate object,

[Wtr-general] FireWatir: test/unit assertions can't be found?

2007-05-09 Thread Chris McMahon
This is odd: require 'rubygems' require 'firewatir' require 'test/unit' require 'firewatir/testUnitAddons' include FireWatir ff = FireWatir::Firefox.new() ff.goto(http://www.socialtext.net/stoss/index.cgi?mcmahon_test;) ff.link(:text, Help).click sleep 5 ff.attach(:title, /Documentation/)

Re: [Wtr-general] RDOC - Help determining what needs documentation

2007-05-09 Thread Bret Pettichord
Jeff Fry wrote: I'm left hoping we can find another way for me to learn what's been added but not documented in v1.5. So Brett, Charley, Paul, or others involved in building v1.5...if you were going to update the rdoc, how would you know what to edit? If you were going to be making the

Re: [Wtr-general] RDOC - Help determining what needs documentation

2007-05-09 Thread Bret Pettichord
Paul Rogers wrote: In my opionion, the rdocs are really dificult to read right now. I think if I was picking up watir now and looking at the rdocs for the first time, Id be a bit disheartened. I would make sure that only relevant ( to the end user ) methods/classes/modules are in the

Re: [Wtr-general] Community involvement with Watir

2007-05-09 Thread Helder Ribeiro
2007/5/5, Željko Filipin [EMAIL PROTECTED]: On 5/5/07, Bret Pettichord [EMAIL PROTECTED] wrote: I think i convinced Zeljko today to take the lead in updating the users guide. You certainly did. Last night I had a dream how I bribed cartoon foxes from why's (poignant) guide to ruby to

Re: [Wtr-general] Community involvement with Watir

2007-05-09 Thread Bret Pettichord
Helder Ribeiro wrote: I think a section of recipes, where people could post clear and well commented code on how to do specific tasks, would also be very useful, perhaps even some non-testing stuff like automating airline ticket searching or emptying large gmail labels. It could start with

Re: [Wtr-general] Watir + Autoit + Save As

2007-05-09 Thread Maisonnette
Ok, But I don't want just to save the html code... When I click on a button, that open a windows popup (a 'save as' window) that I use to save a file to the HDD. I tried this but it doesn't work : ___ Wtr-general mailing list Wtr-general@rubyforge.org

Re: [Wtr-general] FireWatir: test/unit assertions can't be found?

2007-05-09 Thread Chris McMahon
include Test::Unit::Assertions # you need to mix in the assertion methods if you want to use them outside of a testcase. Thanks, got it, I should have seen that. -C ___ Wtr-general mailing list Wtr-general@rubyforge.org

[Wtr-general] Ataaching to windows on slow network connections

2007-05-09 Thread Dhrubojyoti Biswas
Time and again I have faced issues where the WATIR attach method, that returns a handle to a popup window, has misbehaved. Specifically I have noticed this on somewhat slow connections. In Cases where the pop up windows take some time to get rendered on the client machine, the attach method

Re: [Wtr-general] Community involvement with Watir

2007-05-09 Thread Željko Filipin
On 5/8/07, Bret Pettichord [EMAIL PROTECTED] wrote: I think one question Zeljko needs to address is what form he wants it to be. I think he said something about breaking it into separate files, which is fine. Another option is to migrate it to the wiki, which would make eat easier to get

[Wtr-general] Having trouble capturing text in java alert

2007-05-09 Thread gary
Hi everyone, I'm having difficulty in capturing the text from a java alert, and would appreciate anyones input. Using AutoIT, for the pop up window works a treat, allowing me to capture the text, and then select the OK button to proceed with the script: require 'watir' # the controller

Re: [Wtr-general] Ataaching to windows on slow network connections

2007-05-09 Thread Chris McMahon
Untested, but this will try to attach every two seconds forever: def get_popup begin ie.attach(:title, My Window) rescue sleep 2 get_popup end end ## You could put your counter in there with an exit clause. On 5/9/07, Dhrubojyoti

Re: [Wtr-general] Having trouble capturing text in java alert

2007-05-09 Thread Charley Baker
w = WinClicker.new text = w.get_static_text('Microsoft Internet Explorer') # returns an array for each static control text.each {|t| puts t} -Charley On 5/9/07, gary [EMAIL PROTECTED] wrote: Hi everyone, I'm having difficulty in capturing the text from a java alert, and would appreciate

Re: [Wtr-general] The Plan for Watir

2007-05-09 Thread Bret Pettichord
Thanks for your detailed replies. Comments inline. Christopher Rasch wrote: Well, ultimately, I want to be able to handle any popup that the browser throws up: attach to it, manipulate it, etc. My understanding is that better modal dialog support is one of the new features of Watir 1.5.

Re: [Wtr-general] Having trouble capturing text in java alert

2007-05-09 Thread gary
Thanks for the prompt reply. I added the code but it appears to return a value of 'Google', any ideas? require 'watir' # the controller include Watir require 'watir/WindowHelper' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'dl/win32' require 'watir/winClicker' class

Re: [Wtr-general] Ataaching to windows on slow network connections

2007-05-09 Thread Bret Pettichord
Dhrubojyoti Biswas wrote: I am eager to know if there is a better way to do this? Use Watir 1.5. This problem is fixed there. You can look at the repository on openqa if you want details. Bret ___ Wtr-general mailing list Wtr-general@rubyforge.org

Re: [Wtr-general] Community involvement with Watir

2007-05-09 Thread Bret Pettichord
Željko Filipin wrote: Watir user guide can have enterprise look, but I would also like to create one version with cartoon characters. I am sure there are lots of creative people here and I hope they will show their creativity. If you would not like to see cartoon characters in Watir user

Re: [Wtr-general] Community involvement with Watir

2007-05-09 Thread Charley Baker
I'm all for a Why style guide. His surreal style sucks more people in than if it was a plain old manual. Maybe a donut eating platypus instead of foxes. :) -c On 5/9/07, Bret Pettichord [EMAIL PROTECTED] wrote: Željko Filipin wrote: Watir user guide can have enterprise look, but I would

Re: [Wtr-general] Community involvement with Watir

2007-05-09 Thread aidy lewis
On 09/05/07, Bret Pettichord [EMAIL PROTECTED] wrote: Just to be clear, we have always been open to having people add these to our wiki and have often encouraged this. http://wiki.openqa.org/display/WTR/Contributions Bret I think all these important links should become a footnote on

[Wtr-general] Sample Training Presentation and Exercises posted on Wiki

2007-05-09 Thread Brown, David
In case anyone can re-use them, I've posted a basic Watir training presentation and some associated exercises that I've developed and used a few times to train individuals groups in my company on the basics of Watir. Feel free to re-use, modify and enhance them :).

Re: [Wtr-general] Sample Training Presentation and Exercises posted on Wiki

2007-05-09 Thread Chris McMahon
On 5/9/07, Brown, David [EMAIL PROTECTED] wrote: In case anyone can re-use them, I've posted a basic Watir training presentation and some associated exercises that I've developed and used a few times to train individuals groups in my company on the basics of Watir. Feel free to re-use,

Re: [Wtr-general] how to include external script (.rb) in Watir?

2007-05-09 Thread Željko Filipin
On 5/5/07, Alien Ruby [EMAIL PROTECTED] wrote: How are you guys so helpful ? We get a lot of chunky bacon for every correct answer. :) Zeljko -- ZeljkoFilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org

Re: [Wtr-general] Sample Training Presentation and Exercises posted on Wiki

2007-05-09 Thread Bret Pettichord
Chris McMahon wrote: The Scripting101 course could use some enhancement. I'm just sayin'... http://rubyforge.org/frs/?group_id=104 I am actually in the process of rewriting this using the Depot/Rails test application. Bret ___ Wtr-general

Re: [Wtr-general] The Plan for Watir

2007-05-09 Thread Bret Pettichord
Christopher Rasch wrote: Both of these tickets relate to improving the existing modal web dialog support (showModalDialog). At this point, I no longer have plans to work on them and no one else has volunteered to work on them. Probably the biggest problem with our current support for

Re: [Wtr-general] The Plan for Watir

2007-05-09 Thread Paul Rogers
Id like the winclicker code to disappear and be replaced by a full windows testing library ( How you getting along with that Chris ? ). Enough people seem to want it. Paul - Original Message - From: Bret Pettichord [EMAIL PROTECTED] Date: Wednesday, May 9, 2007 1:40 pm Subject: Re:

[Wtr-general] Problem retrieving data from an Ajax page

2007-05-09 Thread Lavanya
Hi All, I am new to watir. I am automating a web configuration page wherein I fill the contents with different values and upon running the selection, the result page pops up. However when i do a view source of the result page it doesn't show me the latest result page value however in the

Re: [Wtr-general] find min/max values in an array of floats

2007-05-09 Thread Bernard Kenik
Message: 4 Date: Tue, 8 May 2007 23:18:00 -0600 From: Chris McMahon [EMAIL PROTECTED] Subject: [Wtr-general] OT: find min/max values in an array of floats To: wtr-general@rubyforge.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1; format=flowed I can

Re: [Wtr-general] The Plan for Watir

2007-05-09 Thread Bret Pettichord
Paul Rogers wrote: Id like the winclicker code to disappear and be replaced by a full windows testing library ( How you getting along with that Chris ? ). Enough people seem to want it. I think a lot of people would like to see that. I certainly would. But last i looked Chris's project

[Wtr-general] Watir Data types exported from excel

2007-05-09 Thread Tunde Jinadu
I'm running a script to read data from a spreadsheet using the following script # open the spreadsheet and get the values excel = WIN32OLE::new('excel.Application') # define the type of application to connect too workbook = excel.Workbooks.Open('d:\Smoke_Test2.xls') # spreadsheet location

Re: [Wtr-general] The Plan for Watir

2007-05-09 Thread Chris McMahon
On 5/9/07, Bret Pettichord [EMAIL PROTECTED] wrote: Paul Rogers wrote: Id like the winclicker code to disappear and be replaced by a full windows testing library ( How you getting along with that Chris ? ). Enough people seem to want it. I think a lot of people would like to see that.

Re: [Wtr-general] Watir Data types exported from excel

2007-05-09 Thread Paul Rogers
your code doesnt show where you create spreadsheetdate but if you use either the text or attribute ( i cant remember which, and dont have excel here ) myval = worksheet.range('a2')['value'] # or ['text'] one of these will do the right thing Paul - Original Message - From: Tunde

Re: [Wtr-general] How to handle pop dialouge boxes by clicking on OK button

2007-05-09 Thread vamsi
Hi Shalini, Thank you very much for your response. How ever i couldn't able to resolve my issue with these solutions. 1 soultion : giving error message as 'NoMethodError: undefined method `dir' for nil:NilClass' and not moving to the next line '$ie.button(:name,button

Re: [Wtr-general] Using custom attributes

2007-05-09 Thread Angrez Singh
Hi, With Watir 1.4.1 you can use xpath to access such elements. tr = ie.element_by_xpath(//[EMAIL PROTECTED]'12345']) - Angrez On 5/10/07, Andrew Kuzmin [EMAIL PROTECTED] wrote: Hi All, Is there any way to access an element by a custom attributes value ? In my situation, for our web

Re: [Wtr-general] How to handle pop dialouge boxes by clicking on OK button

2007-05-09 Thread SHALINI GUPTA
in second solution have u changed the path:- Thread.new{ system(ruby \c:\\PSC\\jscriptExtraAlert.rb\) } i mean to say jscriptExtraAlert...path.. search this file and specy path there... On 5/10/07, vamsi [EMAIL PROTECTED] wrote: Hi Shalini, Thank you very much for your response. How ever

Re: [Wtr-general] Having trouble capturing text in java alert

2007-05-09 Thread SHALINI GUPTA
hi u can use this code.. def start_jsalert_clicker Thread.new{ system(ruby \c:\\PSC\\jscriptExtraAlert.rb\) } #please specify ur path of jscriptExtraAlert end u have to change ur windowhelper.rb file as... def push_alert_button @autoit.WinWait Window Internet Explorer,

Re: [Wtr-general] Having trouble capturing text in java alert

2007-05-09 Thread SHALINI GUPTA
once again..use this function start_jsalert_clicker...before the object who is responsible for java alert popup.. On 5/10/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: hi u can use this code.. def start_jsalert_clicker Thread.new{ system(ruby \c:\\PSC\\jscriptExtraAlert.rb\) } #please