click on last div with same class name and same value

36 views
Skip to first unread message

Alireza

unread,
Mar 26, 2024, 12:51:50 AMMar 26
to Auto Clicker - AutoFill
Dear Firends,
If be some div tag with same class name and same value, how can click on the last one?
for example:

<div class="btn-basket" >Text</div>
.
some html code
.
<div class="btn-basket" >Text</div>
.
.  some html code
.
<div class="btn-basket" >Text</div>
.
.  some html code
.
<div class="btn-basket" >Text</div>    <==   I want to click on this

Alireza

unread,
Mar 27, 2024, 6:02:53 AMMar 27
to Auto Clicker - AutoFill
Nobody can help?

Alexander Kravchenko

unread,
Apr 18, 2024, 11:12:44 PMApr 18
to Auto Clicker - AutoFill
Hello!
Try this:
//div[@class="btn-basket"][last()]

вторник, 26 марта 2024 г. в 05:51:50 UTC+1, Alireza:
Reply all
Reply to author
Forward
0 new messages