[Wtr-general] ignoring specific columns of a table for assertion
Charley Baker
charley.baker at gmail.com
Mon Nov 20 10:49:01 EST 2006
Hi Ajitesh,
The return from column_values is simply an array, so you can grab
specific values if you want:
assert_equal(["Username", "+919812005761"],(@ie.table(:id,
'show_ds')).column_values(2)[0,1])
-Charley
On 11/18/06, Ajitesh Srinetra <ajitesh.srinetra at gmail.com> wrote:
> Hi all
> I have just started using watir but i am getting one problem in assertions.
> The problem is in my web client I have to validate one table's contents.
> i am using this script
>
> assert_equal(["Username", "+919812005761", "Mon Sep 18 00:00:20 IST 2006"],
> (@ie.table(:id, 'show_ds')).column_values(2))
>
> where show_ds is the table name
>
> Now the problem is the third column " Mon Sep 18 00:00:20 IST 2006 " changes
> every day(is the timestamp) .Now is there any method so that watir can
> ignore this columns assertion, like For Ex:
> assert_equal(["Username", "+919812005761", nil], (@ie.table(:id,
> 'show_ds')).column_values(2))
>
> One more thing splitting the assertion in different rows will not help me
> here as the testcase will be very lengthy
>
> Please help me out of this
>
> Bye Ajitesh
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
More information about the Wtr-general
mailing list