Reputation: 83
I have this xpath //*[@id="s2id_autogen8"]
After Refresh Xpath gets change. Can someone please advise how can I create customized XPath for this.
HTML Code:
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input select2-default" id="s2id_autogen38" style="width: 220px;">
Upvotes: 1
Views: 634
Reputation: 1388
try this if id is changing and if class is not changing and also if you want to go with xpath only
//input[contains(@class,'select2-input')]
Upvotes: 1