gpt4 book ai didi

html - 输入后在 div 中查找文本的 XPath

转载 作者:太空宇宙 更新时间:2023-11-04 15:14:30 24 4
gpt4 key购买 nike

我在读取 XPath 时遇到问题。需要专家的帮助/建议。

我的部分 HTML 如下:

<div class = "input required_field">
<div class="rounded_corner_error">
<input id="FnameInput" class="ideField" type="text" value="" name="first_name>
<div class ="help-tooltip">LOGIN BACK TO MAIN</div>
<div class="error-tooltip">

我需要找到短信的 XPath (LOGIN BACK TO MAIN)

使用 Firebug 我找到了 XPath

("//html/body/div/div[5]/div/div/form/fieldset/div/div[2]/div[2]/div/div");

但是使用上面的 XPath 我只能阅读 class = help-tooltip 但我需要阅读 LOGIN BACK TO MAIN

最佳答案

尝试在您拥有的 xpath 末尾添加 /text()

关于html - 输入后在 div 中查找文本的 XPath,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16881356/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com