我需要storeAttribute" // images.wbstatic.net/promotions/wide/51597.jpg"由孩子变量" span class =" countdown-hours "" 有人可以帮忙吗?
<img alt="Autumn Sale" src="//images.wbstatic.net/promotions/wide/51597.jpg">
<div class="countdown-container" data-end-time="\/Date(1444856400000+0300)\/" data-start-time="\/Date(1444805633216+0300)\/">
to the end is
<div class="countdown-timer">
<span class="countdown-days">
<span class="dots">:</span>
<span class="countdown-hours">
07
<span>hours</span>
</span>
答案 0 :(得分:0)
您可以使用以下XPath获取uipopovercontroller
标记。
img
xpath会找到//div[@class='countdown-container'][.//span[@class = 'countdown-hours']]//preceding-sibling::img
标记旁边的div
标记,其中包含img
类span
,然后返回count-hours
标记。