I've just think about a tip I could give you, just in case.
In my test suite, I am looking for the following aTag:
Code: Select all
.//a[@id='ctl00_ctl00_cphMainContent_cphMainContent_DetailCommand_lbClose' and @visible='true']
You may wonder: "why the hell he use such a path?!"
It is due to ajax code, when I click a button on the website and waiting for an object to exist (maybe there is a better way to do it?)
Not to wait 20-30s, I think how I could change the code. Finally I realized I could change the path like that:
Code: Select all
.//a[#'ctl00_ctl00_cphMainContent_cphMainContent_DetailCommand_lbClose']/../a[@visible='true']
What do you think?