Re: [Wtr-general] How can I open and attach file using file_field method?

2006-06-01 Thread Michael Ruschena
I encountered this problem yesterday, and unlike the mail archives, I have an answer. I was getting exactly the behavior described below: 1) I would run a script using file_field.set 2) The script would get to the set method 3a) the choose file window would be invoked 3b) the file setFileDialog.rb

Re: [Wtr-general] How can I open and attach file using file_field method?

2006-06-01 Thread Zeljko Filipin
If you want it fixed, enter a new case at Jira (http://jira.openqa.org/browse/WTR), so it would not be forgotten. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] Determine HTML property

2006-06-01 Thread Adrian Rutter
Hi, I have an HTML field that once saved becomes read-only [readonly=true]. Apart from doing a regex on the source how can I determine this property? Cheers Aidy --- This message and

Re: [Wtr-general] Determine HTML property

2006-06-01 Thread Zeljko Filipin
ie.radio(:id, id).readonly?On 6/1/06, Adrian Rutter [EMAIL PROTECTED] wrote: Hi,I have an HTML field that once saved becomes read-only [readonly=true].Apart from doing a regex on the source how can I determine this

Re: [Wtr-general] How can I open and attach file using file_field method?

2006-06-01 Thread Bret Pettichord
Thanks for solving this problem.Now that we have a click_no_wait method, we shouldn't have to resort to external *.rb files in the first place.BretOn 6/1/06, Michael Ruschena [EMAIL PROTECTED] wrote: I encountered this problem yesterday, and unlike the mail archives, I havean answer. I was

Re: [Wtr-general] Methods that can be used within a frame?

2006-06-01 Thread Tyler Prete
Well I may not even have to deal with it anymore, but how would I change this manually? I do not have control over the HTML in the page, I am only interacting with it via Watir.On 5/31/06, Bret Pettichord [EMAIL PROTECTED] wrote: On 5/31/06, Tyler Prete [EMAIL PROTECTED] wrote: Thank you for the

[Wtr-general] RPC Server unavailable

2006-06-01 Thread Lillis, Dara
Title: RPC Server unavailable Yesterday I spent a bunch of time getting my watir and ruby versions synchronized on the various machines I use for developing and running tests. I am now using: Ruby 1.8.2-15 Stable Release watir-1.5.1.1017 Is this the right (or at least a good) Ruby

Re: [Wtr-general] RPC Server unavailable

2006-06-01 Thread Bret Pettichord
On 6/1/06, Lillis, Dara [EMAIL PROTECTED] wrote: Yesterday I spent a bunch of time getting my watir and ruby versions synchronized on the various machines I use for developing and running tests. I am now using: Ruby 1.8.2-15 Stable Release watir-1.5.1.1017 Is this the right (or at

Re: [Wtr-general] Methods that can be used within a frame?

2006-06-01 Thread Bret Pettichord
On 6/1/06, Tyler Prete [EMAIL PROTECTED] wrote: Well I may not even have to deal with it anymore, but how would I change this manually? I do not have control over the HTML in the page, I am only interacting with it via Watir.By design, Watir is a tool for automating things that you can do

Re: [Wtr-general] `method_missing': document (WIN32OLERuntimeError)

2006-06-01 Thread Bret Pettichord
Please send HTML page and code.On 5/24/06, Manish Sapariya [EMAIL PROTECTED] wrote: Is this one known?I searched through the archive and could not find anything similar to this.I saw this only first time, and I am not sure whether I will see thisagain with the same script.Please let me know if

Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-01 Thread Chris McMahon
I'm doing this because I need to test if a page has been loaded correctly after clicking a link, maybe there's a easier form of checking this.. def wait_for_page(seconds) begin @ie.link(:text,My Incredibly Important Link).click do_the_next_thing_method rescue sleep 1

Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-01 Thread Bret Pettichord
On 6/1/06, Rodrigo Julian Martin [EMAIL PROTECTED] wrote: I was wondering if there's a way of setting the timeout parameter for the .wait method… I mean, let's say that a page doesn't load in 10 seconds. Could I trap that the .wait method failed after 10 seconds in order to log that?

Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-01 Thread Chris McMahon
P.S. I have my doubts about McMahon's suggestion. :) I'm doing something very similar to this in my current Watir scripts right now, except I haven't put in the max-retries logic yet. -Chris ___ Wtr-general mailing list Wtr-general@rubyforge.org

Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-01 Thread Bret Pettichord
The problem is that link().click won't return until the page is loaded. Maybe you meant to use link().ole_object.click instead?BretOn 6/1/06, Chris McMahon [EMAIL PROTECTED] wrote: P.S. I have my doubts about McMahon's suggestion.:)I'm doing something very similar to this in my current Watir

Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-01 Thread Chris McMahon
On 6/1/06, Bret Pettichord [EMAIL PROTECTED] wrote: The problem is that link().click won't return until the page is loaded. Maybe you meant to use link().ole_object.click instead? Ah, you're right, I misunderstood the original question. Rodrigo, in my case, I have interim pages that show

Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-01 Thread John Castellucci
I had a similar requirement and addressed it by adding my methods to the Element class. This may not be the best solution, but it worked for me. module Watir class Element def click_wait(how_long = 30) wait_for(how_long) click end def wait_for(how_long=30)

Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-01 Thread Rodrigo Julian Martin
Thanks for all your replies The Chris McMahon answer doesnt fit exactly with what Im trying to do, but maybe is a good approach Bret, with the assert sentence, can I say something like If assert fails, do some code? John, I cant understand your code, I guess Im too newbie to OO

Re: [Wtr-general] Methods that can be used within a frame?

2006-06-01 Thread David Schmidt
Tyler, What I've done in the past is to create a new method, Element#html= which allows you to replace the outerHTML for any element: class Watir::Element def html=(new_html) assert_exists @o.outerHTML = new_html end end Unfortunately, when playing with your top level document

Re: [Wtr-general] Determine HTML property

2006-06-01 Thread David Schmidt
Zeljko Filipin wrote: ie.radio(:id, id).readonly? On 6/1/06, *Adrian Rutter* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I have an HTML field that once saved becomes read-only [readonly=true]. Apart from doing a regex on the source how can I determine this

Re: [Wtr-general] Methods that can be used within a frame?

2006-06-01 Thread Tyler Prete
Bret, I think we are having some syntactic problems. I CAN do it manually, by interacting with the page myself. I'll try and explain the situation since I can't actually give an example. I am working with a customer service app that has multiple frames, a search bar on the left, a customer frame

Re: [Wtr-general] How to create a script for calendar function?

2006-06-01 Thread Attebery, Bill
Try ie2.show_links to see all the links in the page and ie2.show_tables to see all the tables in the page Looking at the code snippet -- ie2.link(:text, '2').click should set the date to '2006-06-02' ie2.link(:id, ).click should set the date to '2006-06-02' Ie2.table(:index, 2)[2][6].click

Re: [Wtr-general] How to create a script for calendar function?

2006-06-01 Thread Attebery, Bill
Oops -- typo 2nd example should be ie2.link(:index, 7).click should set the date to '2006-06-02' -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Attebery, Bill Sent: Thursday, June 01, 2006 4:06 PM To: wtr-general@rubyforge.org Subject: Re:

Re: [Wtr-general] Methods that can be used within a frame?

2006-06-01 Thread Tyler Prete
I can't provide the full html because I don't have access to it, but here is the link I am trying to click from the popup:a href='' target='cust' 8560113/aI imagine part of the problem is related to the onclick _javascript_ event, however I did try calling it seperately with no success. On 6/1/06,

Re: [Wtr-general] How to create a script for calendar function?

2006-06-01 Thread Lonny Eachus
*IF* (this is a big if, because I am not familiar with the calendar thing) the elements are in a predicable pattern on the page, then here is a possible avenue of approach: You could access the elements by index, and use the html= method of David's to give them names or IDs. Then access as