Hi Malcom, I don't know if this will work for you or not, but I solved (what I think is) a similar problem yesterday.  I had to find a way to click a link in a table that isn't particularly distinguishable from a number of other links on the page.  What I did was use relative addressing to solve the problem.

That is, I told the script to first figure out what cell in the table it wants and then click the first link it finds within it.  The code looks something like:

> ie.frame('MainWindow').table(:index, 3)[spec_row][link_column].link(:index, 1).flash
> ie.frame('MainWindow').table(:index, 3)[spec_row][link_column].link(:index, 1).click

In your case, does the following work for you (i.e. replacing 'spec_row' and 'spec_col' with appropriate values)?

> ie.table(:index, 2)[spec_row][spec_col].select_list(:index, 1).getAllContents

Paul.


On 03/03/06, Beaton, Malcolm < [EMAIL PROTECTED]> wrote:
OK Firstly apologies if this has a really obvious answer that I should have known but it has stumped me and I cant find any really good resources for tables handling (surprisingly)

I have this on a page (see HTML at the bottom) and this table is table[2]. The top row has a box to enter text into (which I can do) and pressing add adds them to the list box at the bottom. I want to automate this and obviously I need to check the bottom box has the artists I added. But I cant seem to hit the table?

I have tried

ie.form( :name, "aspnetForm").select_list( :id, "ctl00_pageBody_FavouriteArtistsListBox").getAllContents

ie.table(:index, 2).select_list(:id,  "ctl00_pageBody_FavouriteArtistsListBox").getAllContents

[snip]

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to