我正在尝试验证文本。尝试了以下 xpath,但仍然显示无法识别元素错误。
//*[@id='bodyPartList_1']/li[1]/div
//div[@id='question_1_5' and contains(@span,'Does the patient weigh over 350lbs?')]
元素的 HTML 源代码:
<div id="question_1_5" class="qaContainer">
<input type="hidden" name="questionIds[]" value="5"/>
<div class="left" style="width: 680px;">
<span class="num">1.</span>
<span class="ans" style="width: 650px;">
Does the patient weigh over 350lbs?</span>
</div>