I have the following xpath statement in selenium test:
//tbody/tr[td/span[text()='IPODate']]/td[4]/input
It gets what I want, but my tests in IE6 are very slow. Does anyone know how I will do the same selector as the CSS selector? I think I understand how to make each of them with an exception with the text () = "IPODate" part.
As requested, here is an example of a table I'm trying to select from:
<table cellspacing="0" cellpadding="4" border="0" id="tblResearchItems" class="coolTable SingleItem"> <tbody>
.... many many lines
<td> <input type="button" value="A" onclick="sA('secm.Company', 'IPODate', 299)" class="RButton NarrowButton2 A Show_N"/> </td> <td class="TCN"> <span class="CN">IPODate</span><f/> </td> <td> <g/> </td> <td class="TCV VerticalAlign"> <input type="text" value="" onfocus="stLT(); hideLB(true)" onblur="mustBeDate($(this));" class="UpUI_Y date NDD hasDatepicker" id="dp1260909771780"/> <img class="ui-datepicker-trigger" src="../images/calendar.gif" alt="..." title="..."/> <div/> </td> </tr>
... many other lines ...
in this example, only one row has an IPODate cell.
source share