mardi 15 décembre 2020

How to click on data-link of div in selenium

Consider the following code:

<div class="results">

<div class="search-results" data-link="some url1">result1</div>
<div class="search-results" data-link="some url2">result2</div>
<div class="search-results" data-link="some url3">result3</div>
<div class="search-results" data-link="some url4">result4</div>


</div> 

Above is a search box in which as we type text it shows some results in the dropdown (ajax call).

The results (as shown in the above code) are links but they are without <a>

How to click on one of these results (say the first result) as they are without <a>?

Aucun commentaire:

Enregistrer un commentaire