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] 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

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

2006-05-31 Thread Danilova, Elza
Title: How to create a script for calendar function? Using WATIR I am having problem to create a document that includes the calendar function. How can I drive a _javascript_ to execute the calendar function, where the text field can not be populated with the date and it's only allow you to

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

2006-05-31 Thread John Fitisoff
If you aren't trying to do anything complicated - and the calendar control responds to keyboard input - you might want to try using the send_keys method to set the calendar control: ie.image(:id, my_calendar_icon).click ie.send_keys({UP}) ie.send_keys({LEFT}) ie.send_keys({ENTER}) The drawback

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

2006-05-31 Thread Attebery, Bill
Not sure if all calendar functions are created equal -- the one used at my site pops up another IE window -- I can attach to it and then drive it like always. ie.image(:id, 'my_calendar_icon').click @ie2=IE.attach(:title, /Select Date/) Now @ie2 is another browser instance with select_lists,