Re: [wtr-general] WIN32OLE.Open - runtime error

2010-07-10 Thread windy
try this, excel.Workbooks.Open('d:/shiv.xls') it should be ok. hope it useful. 在 Thu, 08 Jul 2010 19:30:47 +0800,Shiv tms...@gmail.com 写道: Hello, I am trying to open a excel file and write data, but i m getting runtime error I checked the path is correct new method works fine but open method

Re: [wtr-general] How to handle a pop up having drop down under itself

2010-05-31 Thread windy
do you mean that popup is a modal dialog ? please try this : ie.modal_dialog() to attach this popup. see more : http://www.infoq.com/news/Watir-Adds-Support-for-Modal 在 Mon, 31 May 2010 23:36:05 +0800,Saket sktmis...@gmail.com 写道: Hi All, I am working with an application where a pop up is

Re: [wtr-general] Watir is unable to open nested modal windows using click_no_wait

2010-05-08 Thread windy
you should sleep a second then try again as click_no_wait is always so slow... code like this: loop do begin browser.modal() rescue Watir::Exception::NoMatchingWindowFoundException sleep 1 end end 在 Fri, 07 May 2010 05:15:30 +0800,arti

Re: [wtr-general] i cannot run the scripts on internet explorer[i do have ie8]

2010-05-04 Thread windy
I think ruby1.9's win32api has some problem, so you get the error. please try to use ruby 1.8.6 . hope this help you. 在 Wed, 05 May 2010 00:31:38 +0800,Cristina cristina.toro...@gmail.com 写道: Hi, I am new to ruby/watir. I managed to write a script and running on Firefox. Though I

Re: [wtr-general] Re: how to compare time 10.30 PM with string 10:30 PM

2010-04-11 Thread windy
require 'time' Time.parse(10:40 PM) Time.now # return true So you can use '' method on the Time class directly. please see the book 'rubycook' for more info. 在 Sun, 11 Apr 2010 12:37:40 +0800,Rajiv Nanduani rajivkumarnandv...@gmail.com 写道: i think problem with comparison it actually

Re: [wtr-general] Re: synchronisation in ruby

2010-04-09 Thread windy
use Watir::Waiter.new(120,0.5).wait_until { do something here true... } is ok you can also see commonwatir/lib/watir/waiter.rb ( thx to orde he had tell us ) to understand Waiter class more clear. 在 Sat, 10 Apr 2010 01:14:56 +0800,orde ohil...@gmail.com 写道: Take a look at

Re: [wtr-general] Re: ajax and unable to locate element

2010-04-08 Thread windy
please open irb, try 'browser.show_frames' maybe it's in a frame, so you can't get it . hope it's useful. 在 Thu, 08 Apr 2010 11:26:55 +0800,Sal Jamil salem.m.ja...@gmail.com 写道: I am sorry, it is not available on the web. I can give you the source of the page but it references a lot of

Re: [wtr-general] Re: ajax and unable to locate element

2010-04-08 Thread windy
That's a strange thing . You should check the code of the file again . Google is good, Good luck to you. 在 Fri, 09 Apr 2010 00:24:47 +0800,Sal Jamil salem.m.ja...@gmail.com 写道: To unsubscribe, reply using remove me as the subject. -- Before posting, please read http://watir.com/support.

Re: [wtr-general] undefined method `should' for true

2010-04-03 Thread windy
why you call 'should' ? it's no needed. just code @ie.text.include?(Forgot your password? ) == true is ok. 在 Sat, 03 Apr 2010 20:15:36 +0800,Nishant nishant.jain2...@gmail.com 写道: Tool: Watir Hi, I am getting error:- ruby 1.rb 1.rb:20: undefined method `should' for true:TrueClass

Re: [wtr-general] how to do debug in ruby like qtp step by step

2010-03-12 Thread windy
why do you try to use irb,it can help you. if you really want debug ruby rb, you can install ruby-debug,following this : gem install ruby-debug.then you can debug your ruby file,by using 'rdebug' that it so like gdb... 在 Sat, 13 Mar 2010 01:48:07 +0800,Rajiv Nanduani

Re: [wtr-general] Dealing with the  character

2010-03-09 Thread windy
I think it's because the page encoding is different from utf-8,the default encoding(in watir1.6.5 it's utf-8). Maybe you can change here: WIN32OLE.codepage = WIN32OLE::CP_UTF8 at watir-1.6.5\lib\watir\win32ole.rb. Here's some Value you can try WIN32OLE::CP_ACP WIN32OLE::CP_OEMCP

Re: [wtr-general] How can I click on this button / form

2010-03-07 Thread windy
if you can use href attribute, try browser.link(:href,https://www.Race.com/swiki/4phoyzf6u9qheb2gj036471fj?_s=DeMjZhiczxzzGeAh_k=pDVYZqbD1;).click or you can use xpath, code like browser.link(:xpath,//i...@src='/button_genomfor_fund.gif']/..).click 在 Sun, 07 Mar 2010 15:31:42 +0800,HeG

Re: [wtr-general] Re: execution expired

2010-03-02 Thread windy
but not from proxy. hope it is useful for you. 在 Tue, 02 Mar 2010 03:16:30 +0800,hliauw hli...@gmail.com 写道: Windy, thanks a bunch. toutval is currently set to 30s and 40s respectively. The url is an internal test page with just 9 images in it. I tested the url manually from the same machine

Re: [wtr-general] execution expired

2010-03-01 Thread windy
method Timeout::timeout throw Timeout::Erorr exceptions,it happens if browser can't open or open it too slow. you should test the url manual,or increase var 'toutval'. 在 Tue, 02 Mar 2010 01:17:53 +0800,hliauw hli...@gmail.com 写道: Hi, can somebody help me understand the following exceptions?