迭代WWW :: Selenium中的嵌套类

时间:2012-06-04 16:59:03

标签: html perl selenium loops

WWW::Selenium中是否有任何方法允许我迭代这个结构(HTML代码)并访问hrefs?

<div class="myGengo_wrap full_width">
<h1>Dashboard</h1>
    <div class="blue list">
    <span class="title">Sections </span>
        <span class="dashboard_master_language">
        <span class="dashboard_language wide">
            <a href="http://mygengo.com/string/p/demoproject-1/admin/languages/settings/en_us">Englisch (Master) </a>
        </span>
    </span>
    <span class="dashboard_languages">
        <span class="dashboard_language wide">
            <a href="http://mygengo.com/string/p/demoproject-1/admin/languages/settings/zh_cn">Chinese </a>
        </span>
        <span class="dashboard_language wide">
            <a href="http://mygengo.com/string/p/demoproject-1/admin/languages/settings/de_de">German </a>
        </span>
    </span>
      ...
      ...
</div> 

1 个答案:

答案 0 :(得分:1)

有一个get_all_links方法 - 请参阅documentation