I have a problem with test payment gateway pop-up handling with this HTML code:
<div class="">
<div class="legend">Select payment method</div>
<div id="payment-options" class="grid clear count-3">
<div class="payment-option item" tab="card"> </div>
<div class="payment-option item" tab="netbanking">
<label>
<i></i>
Netbanking
</label>
</div>
</div>
<div class="clear"></div>
I am using XPath: //*[@id='payment-options']/div[2]/label
. I have to click image link but every time I'm getting an error as Unable to locate . Can anyone help me here?
div[2]
under*[@id='payment-options']/
tag, in the HTML code you shared. There is only onediv
tag. Can you please let me know which element you want to click – k.s. Karthik