Dynamic xpath in Selenium -


how write xpath expression these kind of ids identifier contains numbers (ex: 11784) change every build.

id='tab-11784-customer' id='tab-11784-tracker' 

question; why have use xpath in scenario? based on fact searching id, css makes more sense

[id^=tab-][id$=-customer] 

if must use xpath then;

//*[starts-with(@id, 'tab-') , contains(@id, 'customer')] 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -