|
When adding dynamic content to a table what I have had to do
is something like: #Load the contents of the table and its objects into the
table variable table = $ie.table(:index, 2) table[3][2].click $ie.text_field(:name, ' ctl00$pageBody$FavouriteArtistsTextBox
').set("Some text you add") $ie.button("ctl00$pageBody$AddArtistButton
").click #This will reload the just entered dynamic content so you
can search it. table = $ie.table(:index, 2) sList = table[3][2]. select_list(:id,
"ctl00_pageBody_FavouriteArtistsListBox").getAllContents for myList in sList next if myList =~ /Some text you add/ puts “Item found in list” end Hope this helps, --Mark From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Beaton, Malcolm 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 And a few other
things but I cant get the content back out of it. All it tells me is this is an
undefined method for #<Watir::Table:(some crap)>
<table> </select>
Thanks in advance Malcolm |
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
