51Testing软件测试论坛

标题: tr定位问题 [打印本页]

作者: 米菲儿    时间: 2016-9-1 13:44
标题: tr定位问题
急急急!我想知道图中的最后一个tr该如何定位,每次tr都是变化的,我要定位的是最后一个,求各位帮助,maichang_last_loc=(By.XPATH,"//table[@id='gridTemp']/tr[last()]"),
<tr tabindex="-1" class="ui-widget-content jqgrow ui-row-ltr altCss1" id="6" role="row">
<td title="56" class="ui-state-default jqgrid-rownum" role="gridcell" aria-describedby="gridTemp_rn" style="text-align: center;">
<td title="编辑" role="gridcell" aria-describedby="gridTemp_ShopDtl" style="text-align: center;">
<td title="面" class="validate validate-table maxlength notnull" role="gridcell" aria-describedby="gridTemp_ShopName" validate-maxlength="200">
<td title="加盟店" role="gridcell" aria-describedby="gridTemp_ShopType" style="text-align: center;">
<td title="暂无" class="validate validate-table maxlength notnull cursor-pointer" role="gridcell" aria-describedby="gridTemp_ShopState" style="text-align: center;" onmouseover="underLine()" onmouseout="nounderLine()" validate-maxlength="200">
<td title="暂无" class="validate validate-table maxlength notnull cursor-pointer" role="gridcell" aria-describedby="gridTemp_ManagerName" style="text-align: center;" onmouseover="underLine()" onmouseout="nounderLine()" validate-maxlength="200">
<td title="" role="gridcell" aria-describedby="gridTemp_UseChk" style="text-align: center;">
<td title="2016-09-01" class="validate validate-table notnull" role="gridcell" aria-describedby="gridTemp_SDate" style="text-align: center;">
作者: 米菲儿    时间: 2016-9-1 13:58
maichang_last_loc=(By.XPATH,"//table[@id='gridTemp']/tr[last()]")
这个是我自己定位的,但是不正确




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2