【发布时间】:2023-03-06 16:30:01
【问题描述】:
我需要从下面的 html 中获取文本“未找到结果,单击选项卡以使用输入的文本”。
<div id="boundlist-1520-listEl" class="x-boundlist-list-ct" style="overflow: auto; height: auto;">
<ul></ul>
No results found, click tab to use entered text
</div>
当我尝试使用 div id 时,它会抛出错误。
谁能帮我得到这个的xpath。
非常感谢。
问候, 苏达巴纳卡
【问题讨论】:
-
您遇到的错误是什么?添加您正在使用的 xpath
-
您使用的是哪个 Selenium 客户端 Java/Python/C# ?
-
id 似乎是动态的,尝试使用 classname
x-boundlist-list-ct
标签: selenium