You could also just use table index. If you do a view source on the page, then do a <ctrl>f. Beginning at the top of the page, put '<table' (without quotes) into the search field and begin counting by clicking the next button. When you get to desired table that 'count' number is your table index (it is 1 based). I have found this to much more reliable then xpath-which I have never been able to get to work correctly.
Hope this helps, --Mark ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Angrez Singh Sent: Thursday, November 23, 2006 9:46 PM To: [email protected] Subject: Re: [Wtr-general] Table has no unique attributes Hi, I think you can select the element using class attribute. Else you can use xpath for selecting the element using any attribute that uniquely identifies that element on the page. This all is available in watir releases greater than 1.4.1. Regards, Angrez On 11/23/06, Garry West <[EMAIL PROTECTED]> wrote: I am quite new to watir and I am currently trying to automate some tests, however I am having difficulties clicking on a link within a cell in a table. I have done this before however this table has no name or id, Infact the only thing I have to identify the table is a class. I am assuming that I am not the first person to encounter this issue and I'm hoping that someone knows how to get around this problem. Anyone got any ideas?? Regards Garry West Trainee Test Analyst InPS Tel: 01382 564313 Visit our Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of In Practice Systems Limited or any of its affiliates. If you are not the intended recipient please contact [EMAIL PROTECTED] P please don't print this e-mail unless you really need to. _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
