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
Post a Comment