Я новичок в транспортир. Я использую его для получения значения из таблицы с помощью 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>
element(by.xpath("//tr/td[@style='min-width:51px']")).getText().then(function(result)
console.log("+++++++++++++++++"+ result);
});