[wtr-general] Re: FireWatir bug/anomaly

2009-04-12 Thread Alex Collins
I've just had a quick look, also on FF3/Mac. The issue is not that the select_list element is invisible - you can address it correctly as show by calling: @browser.select_lists or @browser.select_list(:id, 'cAbb') Calling the methods method on the element reveals that the set method you are

[wtr-general] Re: the ie.goto() problem

2009-04-12 Thread Chai Taolun
Hi~ Sorry, this is not like that, I want to visit some webpage using the name I store in the text file. I need to find a way to do this. Thank you allen On Sat, Apr 11, 2009 at 1:22 PM, kiran gki...@gmail.com wrote: Hi, I think problem with folder path. suppose if we want open a file

[wtr-general] Re: Posting invalid form data with Watir

2009-04-12 Thread Jarmo Pertman
You should be able to use JavaScript to make these things. For example, I have this select list on my page: select name=menu option value=0 selected0/option option value=1one/option /select Now, in Watir I could do something like this with JavaScript: script = %q {

[wtr-general] Re: Posting invalid form data with Watir

2009-04-12 Thread Jarmo Pertman
On Apr 12, 2:49 pm, Jarmo Pertman jarm...@gmail.com wrote: script = %q { Sorry, I had one extra space in here - %q {... Correct would be %q { (so, there's no space after %q) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[wtr-general] Re: trying to access text_field, but getting link instead?!?

2009-04-12 Thread Jarmo Pertman
Sorry for causing confusion in here. I was saying on my first post already that there wasn't any text_field with id info on that page so that link with id info was the only one. I was just on the wrong page with my Watir, but I was surprised that it found an link even if I were trying to find

[wtr-general] Re: trying to access text_field, but getting link instead?!

2009-04-12 Thread Jarmo Pertman
You're saying that :zippy only removes delays. For me it also doesn't fire any events (at least not onchange). I just discovered it - that's the reason why my onchange events haven't fired without implicitly calling fire_event(onchange) after changin text_field's value (I was using value =

[wtr-general] Re: the ie.goto() problem

2009-04-12 Thread Chai Taolun
Hi~ Thank you. I already check this. It is working fine. here is the entire source code. require 'watir' require 'win32ole' require 'thwait' inputFile = C:\\codework\\watir\\Qian\\in.txt logfile = C:\\codework\\watir\\Qian\\logfile.txt testCaseFile = C:\\codework\\watir\\Qian\\Book1.xls #def

[wtr-general] Re: the ie.goto() problem

2009-04-12 Thread Alex Collins
I believe that the issue is that you are passing in an Array into goto, when it expects a string: http://wtr.rubyforge.org/rdoc/ - look at the Watir::IE class' goto method. You create an array on the following line: thisLocation = folderLocation, i Explicitly stated, you can read this as:

[wtr-general] Re: FireWatir bug/anomaly

2009-04-12 Thread Chris McMahon
Calling the methods method on the element reveals that the set   method you are calling is not present. I was surprised to see that   this method exists - I've always used the select method, which works   fine. The RDoc reveals that set should be an alias for select. I would suggest using

[wtr-general] Re: the ie.goto() problem

2009-04-12 Thread Chai Taolun
Hi~ Thank you alex! I got it. thank you so much. allen On Sun, Apr 12, 2009 at 9:00 AM, Alex Collins a.j.collins...@gmail.comwrote: I believe that the issue is that you are passing in an Array into goto, when it expects a string:http://wtr.rubyforge.org/rdoc/ - look at the Watir::IE class'

[wtr-general] Re: FireWatir bug/anomaly

2009-04-12 Thread Paul Rogers
there is some functionality in firewatir ( at least the version that I had been using) that doesnt generate exceptions when there is a javascript exception. Id fixed this some where once ( probably in a local copy of firewatir) , but I guess the code got lost Paul On Sun, Apr 12, 2009 at 8:16

[wtr-general] why the ruby says Unable to locate element?

2009-04-12 Thread Chai Taolun
Hi~ I got a other problem about the ruby run the php webpage. Here is the thing: when I run the code, it gives me the error :in `assert_exists': Unable to locate element, using :name, fahrenheit (Watir::Exception::UnknownObjectException) but in my php page. I do have the fabrenheit. I got so

[wtr-general] Re: why the ruby says Unable to locate element?

2009-04-12 Thread George
Hello, What code are you using to access the form? On Apr 12, 7:34 pm, Chai Taolun ctco...@gmail.com wrote: Hi~ I got a other problem about the ruby run the php webpage. Here is the thing: when I run the code, it gives me the error :in `assert_exists': Unable to locate element, using

[wtr-general] Having non-Watir users run your scripts

2009-04-12 Thread George
Hello all, Is there a way of creating a script that can be run on any computer, regardless whether it has Watir installed? Does rubyscript2exe allow me to do this? Thanks in advance, George --~--~-~--~~~---~--~~ You received this message because you are

[wtr-general] Re: why the ruby says Unable to locate element?

2009-04-12 Thread Chai Taolun
Hi~ thank you for your help The code I use is in here ie.textField(:name, fahrenheit).set(arg1.to_s) ie.button(:value, transfer).click if ie.contains_text(ans.to_s) fileHandle :::Passed\n\n else fileHandle :::failed\n\n end Thank you Allen On Sun, Apr 12, 2009 at

[wtr-general] Re: why the ruby says Unable to locate element?

2009-04-12 Thread George
Are you just trying to insert text into a text_field, or are you trying to access the form? If it's the latter, I believe you need to use: ie.form(:id, 'fahrenheit') On Apr 12, 7:52 pm, Chai Taolun ctco...@gmail.com wrote: Hi~ thank you for your help The code I use is in here

[wtr-general] Re: why the ruby says Unable to locate element?

2009-04-12 Thread Chai Taolun
Hi~ Thank you in advance. But I try this, It gives me an another error. awat.rb:67: undefined method `set' for #Watir::Form:0x8dd6e10 (NoMethodError) from awat.rb:54:in `each' from awat.rb:54 so how can I input the data in this webpage? Thank you Allen On Sun, Apr 12, 2009 at 11:28 PM,

[wtr-general] Re: why the ruby says Unable to locate element?

2009-04-12 Thread George
Have you tried using the IE Developer Toolbar to correctly identify the element on your page? This should help you insert the data into the text field (if that is what you're trying to do). Regards, George On Apr 12, 9:11 pm, Chai Taolun ctco...@gmail.com wrote: Hi~ Thank you in advance.