admin管理员组

文章数量:1353527

Is it possible to loop, individually click similar looking elements and from the new tab launched, click a download link?

Here the first element of the list:

<div role="listitem" aria-label="training session" class="row history-list__row history-list id-4021515650">
    ...
    <div class="col-xs-6 col-sm-4 col-md-4 col-lg-4 exercise-link">
        ...
        <div class="sport-name-container">
            <div class="data-column exercise-link">Mountain biking</div>
        </div>
    </div>
    ...
</div>

When I went through and recorded one click (by clicking Mountain Biking), I got the following commands logged:

  • click, css=.id-4021515650 > .col-xs-6 .data-column
  • store window handle, root
  • select window, handle=${win2368}

I suspect that handle=${win2368} is always going to be unique for each tab during each run thus impossible to figure out?

本文标签: selenium ideLooping and clicking similar element that opens new tabStack Overflow