<label>Please <strong>help</strong> me out</label>
为此我尝试了XPath
.//label[text()="Please help me out"]/following-sibling::input
并尝试了
.//label[contains(text(), "Please help me out"]/following-sibling::input
我尝试过搜索,但没有得到确切的搜索结果。
答案 0 :(得分:0)
你可以使用输入self的属性来定位它。 xpath:
optional()
css选择器:
//input[@placeholder='Please enter important names']
或者在xpath中使用标签辅助:
input[placeholder='Please enter important names']