How to write a regular expression for changing index
Posted: Thu Sep 28, 2017 12:50 am
Hello there,
I am validating on logo of the website, but the index of the dom keeps changing which is causing my test case to fail. Can some one tell how to write a regular expression for a changing index. I browsed through the examples of regular expression in your website but could not find an appropriate solution for my problem.
Example Xpath: /dom[11]//div[#'headleft']?/?/img[@alt='Bio-Rad logo']
In the above example dom[11] might become dom[5] and so on. How can i avoid this problemt
I am validating on logo of the website, but the index of the dom keeps changing which is causing my test case to fail. Can some one tell how to write a regular expression for a changing index. I browsed through the examples of regular expression in your website but could not find an appropriate solution for my problem.
Example Xpath: /dom[11]//div[#'headleft']?/?/img[@alt='Bio-Rad logo']
In the above example dom[11] might become dom[5] and so on. How can i avoid this problemt