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:


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=html > body > form#ctl01 > div:nth-of-type(3) > div:first-of-type > div:nth-of-type(2) > a#HeadLoginView_HeadLoginStatus' } ).DoClick();