如何匹配 html table 第一行的项目?
How to match an item in first row of a html table?
这是 UI 的片段。让我知道如何定义使用空手道自动化。
<tr class="row" id="row0">
<td class ="ID1">AXZ123</td>
<td class ="ID2">AXZ456</td>
<td class ="ID3">AXZ789</td>
<input type="radio" "name=radio0">
我想匹配 AXYZ123 == locateAll("//tr..")。
请告诉我准确的定义方式。
试试这个方法:https://github.com/intuit/karate/tree/master/karate-core#tree-walking
* def rows = locateAll('tr')
* def firstRow = rows[0]
* def temp = firstRow.firstChild.text
* print temp
另请参阅:
这是 UI 的片段。让我知道如何定义使用空手道自动化。
<tr class="row" id="row0">
<td class ="ID1">AXZ123</td>
<td class ="ID2">AXZ456</td>
<td class ="ID3">AXZ789</td>
<input type="radio" "name=radio0">
我想匹配 AXYZ123 == locateAll("//tr..")。
请告诉我准确的定义方式。
试试这个方法:https://github.com/intuit/karate/tree/master/karate-core#tree-walking
* def rows = locateAll('tr')
* def firstRow = rows[0]
* def temp = firstRow.firstChild.text
* print temp
另请参阅: