HTML:
<div class="v-input__control"><div class="v-input__slot"><div class="v-text-field__slot"><input id="input-357" type="text"></div></div><div class="v-text-field__details"><div
I tried this:
//*[text()='Enter Phone Number']/following-sibling::*//input
But got no success.
构造xpath时,表达式需要以tag_name
开始,例如.<div>
、<table>
等,或者以.*`*开头,前面总是有双正斜杠,即
//`
实际上,您的代码行将是:
//*[text()='Enter Phone Number']//following-sibling::input[1]
您缺少标记名
xpath=//标记名[@attribute=value]