[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Newbie working with fluid table

Joe Pizzanley

3/14/2008 7:31:00 PM

I'm slowly and excitedly learning to do automated testing via Ruby. I
have a webpage with details for a specific video file stored. I can
check the details for correctness, but my problem is that not all the
details will display every time. This re-numbers the table rows and I
don't know how to adapt to this.

For example, this:
def test_verifyData
verify(($ie.table(:index, 4)[1][2].text ==
'Movie.mpg'),message="wrong name")
verify(($ie.table(:index, 4)[2][2].text == 'VID0817'),message="wrong
ID")
verify(($ie.table(:index, 4)[3][2].text == '02/28/08'),message="wrong
sent date")
verify(($ie.table(:index, 4)[4][2].text == 'mp2'), message="wrong
filetype")
end

can become this:
def test_verifyData
verify(($ie.table(:index, 4)[1][2].text ==
'Movie.mpg'),message="wrong name")
verify(($ie.table(:index, 4)[2][2].text == 'VID0817'),message="wrong
ID")
verify(($ie.table(:index, 4)[3][2].text == 'mp2'),message="wrong
filetype")
end

i.e., "date sent" in row 3 isn't displayed and now file type which was
row 4 becomes row 3.

thanks!
--
Posted via http://www.ruby-....

1 Answer

Joe Pizzanley

3/17/2008 3:43:00 PM

0

Reposting - hoping to get some helpful ideas.

>>>>>>
I'm slowly and excitedly learning to do automated testing via Ruby. I
have a webpage with details for a specific video file stored. I can
check the details for correctness, but my problem is that not all the
details will display every time. This re-numbers the table rows and I
don't know how to adapt to this.

For example, this:
def test_verifyData
verify(($ie.table(:index, 4)[1][2].text =='Movie.mpg'),message="wrong
name")
verify(($ie.table(:index, 4)[2][2].text == 'VID0817'),message="wrong
ID")
verify(($ie.table(:index, 4)[3][2].text == '02/28/08'),message="wrong
sent date")
verify(($ie.table(:index, 4)[4][2].text == 'mp2'), message="wrong
filetype")
end

can become this:
def test_verifyData
verify(($ie.table(:index, 4)[1][2].text =='Movie.mpg'),message="wrong
name")
verify(($ie.table(:index, 4)[2][2].text == 'VID0817'),message="wrong
ID")
verify(($ie.table(:index, 4)[3][2].text == 'mp2'),message="wrong
filetype")
end

i.e., "date sent" in row 3 isn't displayed and now file type which was
row 4 becomes row 3.

thanks!
--
Posted via http://www.ruby-....