1

I have the following HTML

    <div class="cart-rem-coupon">
        <span class="rem-icon" onclick="myVoucher.remove('2999','remove_voucher_
button');">&nbsp;</span><a onclick="myVoucher.remove('2999','remove_voucher_link
')" href="javascript:void(0)"><u>Remove Voucher</u></a>
    </div>

I want to autoclick such that

document.getElementsByClassName("rem-icon")[0].click(); (this is inside the evaluate)

Am getting the following error :

'undefined' is not a function (evaluating 'document.getElementsByClassName ("rem-icon")[0].click()')

Any rason where am i doing wrong??

user2129794
  • 2,388
  • 8
  • 33
  • 51

0 Answers0