获取标题属性值的XPath表达式
我正在尝试编写一个XPath表达式,返回下面列表项中链接的title属性的值:获取标题属性值的XPath表达式,xpath,Xpath,我正在尝试编写一个XPath表达式,返回下面列表项中链接的title属性的值: <li class="ProfileNav-item ProfileNav-item--followers"><a href="/profileurl/followers" data-nav="followers" title="796,433 Followers" class="ProfileNav-stat ProfileNav-stat--link u-borderUserColor u-te
<li class="ProfileNav-item ProfileNav-item--followers"><a href="/profileurl/followers" data-nav="followers" title="796,433 Followers" class="ProfileNav-stat ProfileNav-stat--link u-borderUserColor u-textCenter js-tooltip js-openSignupDialog js-nonNavigable u-textUserColor" target=""><span class="ProfileNav-label">Followers</span> <span data-is-compact="true" class="ProfileNav-value">796K</span></a></li>
因此,我正在寻找一个XPath表达式,它将返回“796433追随者”
如果有人能帮助我,我将不胜感激!非常感谢 检查
li
内的类,并获取a
内标记的@title
:
//li[contains(@class, "ProfileNav-item")]/a/@title
什么是搜索条件?