我是量角器的新手。我正在使用它来使用xpath从表中获取值。当我运行下面的代码时,它返回的是对象而不是td值
量角器代码: var result = element(by.xpath(“// tr / td [@ style ='min-width:51px']”)); console.log(“+++++++++++++++++++++++++++++++++++++++
输出: +++++++++++++++++++++++++++++
HTML页面:
<div class="ng-scope" ng-include="'product/main/views/ABC.html'" ng-if="context.pat">
<section class="module module-pat product-banner ng-scope" ng-controller="product.main.PBS">
<figure class="pat-photo pull-left">
<table class="table-overview pull-left">
<tbody>
<tr>
<td style="min-width:225px">
<td class="ng-binding" style="min-width:51px">F</td>
<td class="ng-binding" style="min-width:61px">56</td>
<td class="ng-binding" style="min-width:130px">1958-03-13</td>
<td class="ng-binding" style="min-width:115px">Welby</td>
<td class="ng-binding" style="min-width:178px">United</td>
<td class="ng-binding" style="min-width:80px">Yes</td
<td>
<span class="label label-important ng-binding"/>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<th class="pat-number ng-binding">123456789 </th>
<th class="ng-binding">Sex</th>
<th class="ng-binding">Age</th>
<th class="ng-binding">DOB</th>
<th class="ng-binding">PCP</th>
<th class="ng-binding">Country</th>
<th class="ng-binding">Insurance</th>
</tr>
</tfoot>
</table>
答案 0 :(得分:0)
echo /cal_abc | sed -e 's/[a-z]*$//'