selenium中选择同一节点下元素的方法

上一篇 / 下一篇  2013-04-24 17:25:32 / 个人分类:selenium

頁面元素中子元素Text獲取時Xpath寫法:
          
元素的source結構:

<div class="content">
 this is the content
   <span class="more">
  <a href="/_YQPOG5A3YNVJUAIOGPGH27ISUQ/blog/articles/1?listPage=article">更多</a>
   </span>
</div>

獲取其中this is the content 的XPath://div[@class='content']/child::text()[1]

w3c中XPath的構造可以學習這個網站:http://www.w3.org/TR/xpath


TAG: Selenium selenium xpath XPATH

 

评分:0

我来说两句

我的栏目

日历

« 2024-03-26  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

我的存档

数据统计

  • 访问量: 277
  • 日志数: 1
  • 建立时间: 2013-04-24
  • 更新时间: 2013-04-24

RSS订阅

Open Toolbar