1
我正在嘗試爲我的自動測試創建一個xpath。我有以下代碼:Xpath如何使用另一個元素文本值獲取一個元素
<span class="left-floated">
<input class="PfcExecutiveBrief" type="checkbox" value="PfcExecutiveBrief" name="DocumentTypeResearch"/>
<label for="PfcExecutiveBrief">Executive Brief</label>
<br/>
<input class="Memo" type="checkbox" value="PfcMemo" name="DocumentTypeResearch"/>
<label for="PfcMemo">Memo</label>
<br/>
<input class="PfcOtherResearchForNaturalGasOrOil" type="checkbox" checked="checked" value="PfcOtherResearchForNaturalGasOrOil" name="DocumentTypeResearch" disabled=""/>
<label for="PfcOtherResearchForNaturalGasOrOil">Other Research</label>
<br/>
<input class="PfcProfile" type="checkbox" value="PfcProfile" name="DocumentTypeResearch"/>
<input type="hidden" value="PfcOtherResearchForNaturalGasOrOil" name="DocumentTypeResearch"/>
<label for="PfcProfile">Profile</label>
<br/>
</span>
我想創建xpath幫助我檢查所選標籤的輸入元素。所以我的問題是,如何爲每個標籤獲得單個輸入元素?
例如,如果:
label[text()='Memo']
如何讓第二個輸入等等,等等。