The solution is to override the built-in HTML locator functionality (used when testing Web applications) and modify the XPATH / CSS locator on the fly. The following simple example will show you how to adjust the XPATH or CSS of a specific object:

Normally you'd use a learned object such as:

SeS("Log_In").DoClick(0,0,true);

to override the XPATH locator, we just pass it through as an extra JavaScript object parameter:

SeS("Log_In", { xpath: "/html/body//a[@id='HeadLoginView_HeadLoginStatus2']" }).DoClick();

Or to use CSS we'd simply use:

SeS("Log_In", { xpath: "css=a#HeadLoginView_HeadLoginStatus" }).DoClick();