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

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -