[wtr-general] $ie.maximize

2009-03-03 Thread Vikas Tulashyam
Hi Friends, I am not able to use the maximize method of IE class. Please see the below code. An error is thrown for maximize method. Please suggest if something wrong-- require 'watir' require 'test/unit' class TestSuite_IRCTC Test::Unit::TestCase $ie = Watir::Browser.new $test_site =

[wtr-general] Re: $ie.maximize

2009-03-03 Thread wesley chen
If you install Ruby in your c:\, please run command: regsvr32 C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib\watir\AutoItX3.dll Thanks. Wesley Chen. On Tue, Mar 3, 2009 at 5:23 PM, Vikas Tulashyam vtulash...@gmail.comwrote: Hi Friends, I am not able to use the maximize method of IE class.

[wtr-general] popup handling

2009-03-03 Thread Vikas Tulashyam
Hi friends, I am getting an error while handling the popup. I have attached the code and following is the error message�� :/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/contrib/ enabled_popup.rb:5: uninitialized constant Watir::PageContainer::Win32 (NameError) from

[wtr-general] Re: Add date

2009-03-03 Thread Wesley Chen
Hi, Prince, please try the code below: require 'watir' def date_validation( source, count, operation) start_date = source date = Date.strptime(start_date, '%d-%b-%Y') if operation == a or operation==A date += count elsif operation == d or operation==D date-= count

[wtr-general] Re: Add date

2009-03-03 Thread Enock Prince
Thanks chen, You are rocking Prince3105 On Tue, Mar 3, 2009 at 5:55 PM, Wesley Chen cjq@gmail.com wrote: Hi, Prince, please try the code below: require 'watir' def date_validation( source, count, operation) start_date = source date = Date.strptime(start_date, '%d-%b-%Y')

[wtr-general] Watir

2009-03-03 Thread Jmitchum
I had to reinstall Watir/ Ruby after several attempts, I found I had to delete the registry entries, they are not deleted with the app was uninstalled. I apparently missed some, and finally installed Watir/ Ruby in a different directory. Now when I attempt to run a script I am getting the

[wtr-general] Reading result of a command

2009-03-03 Thread venky
Hi All, I am using system(dir) to execute commands in Command Prompt. I get the result(below) when I execute system(dir) command. I need to store the result in an array. I tried arr = system(dir) which stores true or false. Please throw some light on this Result:

[wtr-general] Re: Watir

2009-03-03 Thread LFIdnl
I think your PATH variable was broken. You should add info about ruby path into PATH variable. Or insert 'require 'rubygems' ' at the begin of your tests On 3 мар, 16:56, Jmitchum juliamitc...@gmail.com wrote: I had to reinstall Watir/ Ruby after several attempts, I found I had to delete the

[wtr-general] Re: click_no_wait and click! not working javascript popup

2009-03-03 Thread Jim Matthews
Here are the steps to reproduct the problem. First bring up unittests \html\popups1.html in IE. \Ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\unittests\html\popups1.html Next run this script. I have extra puts in it to try to figure out what is going on. They can be remvoed or commented out. Jim

[wtr-general] Re: Reading result of a command

2009-03-03 Thread LFIdnl
If I understand you need to get list of files in directory. You should use FileUtils module to get clear result http://ruby-doc.org/core/classes/FileUtils.html On 3 мар, 17:01, venky venkatesh...@gmail.com wrote: Hi All, I am using system(dir) to execute commands in Command Prompt. I get

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

2009-03-03 Thread SQAPro
I should think the latest released version of each would work well. one warning regarding Ruby's unit testing framework, it presumes that unit tests are all fully independant, and can be run in pretty much any order or in complete isolation from one another. Ruby runs the tests not in the order

[wtr-general] enabled_popup internal error

2009-03-03 Thread andrew . dahl
Trying to execute enabled_popup and it is throwing an exception undefined local variable or method `hwnd' for #Watir::Frame: 0x3d7b4d4 I checked the source for enabled_popup and it does seem to have an undeclared variable. Is this working for other people. Working on latest version of watir.

[wtr-general] Re: Reading result of a command

2009-03-03 Thread Andy Sipe
One caveat to this is that you only get stdout using the backtick. You don't get the other streams (stderr, etc..). At least this is my experience on windows. -andy On Tue, Mar 3, 2009 at 4:05 PM, Bill Agee billa...@gmail.com wrote: To get the standard output of a command, you can enclose

[wtr-general] Re: Reading result of a command

2009-03-03 Thread Bill Agee
That is what I thought for a while too, but in this case you can have your cake and eat it too, at least with stderr. :) Windows lets you redirect STDERR to STDOUT, so you can use that when executing commands within Ruby. For example, when running nslookup and failing to resolve a host, part of

[wtr-general] Re: Reading result of a command

2009-03-03 Thread LFIdnl
May be this help you IO.popen(dir) { |f| f.each_line { |line| puts line } } So each 'line' you can save into array. Read more about http://www.ruby-doc.org/core/classes/IO.html#M002267 On 3 мар, 17:01, venky venkatesh...@gmail.com wrote: Hi All, I am using system(dir) to execute