51Testing软件测试论坛

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

作者: wt12angel    时间: 2016-9-1 14:04
标题: 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;">

作者: seagull1985    时间: 2016-9-2 10:38
你的图呢?图没有上上来
作者: wt12angel    时间: 2016-9-2 17:16
图上来了,上次没上成功




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