[Wtr-general] Table has no unique attributes

Cain, Mark Mark_Cain at RL.gov
Mon Nov 27 09:55:10 EST 2006


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: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Angrez Singh
Sent: Thursday, November 23, 2006 9:46 PM
To: wtr-general at rubyforge.org
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 <gwest at inpses.co.uk> 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 is.helpdesk at inps.co.uk 

 

P please don't print this e-mail unless you really need to.

 


_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061127/b71d0297/attachment-0001.html 


More information about the Wtr-general mailing list