private String generateXPathLocator ( ) throws WidgetException { if ( xPathLocator == null ) { IElement elem = new Element ( getByLocator ( ) ) ; String key = "tablewidgetattribute" ; long value = System . currentTimeMillis ( ) ; elem . eval ( "arguments[0].setAttribute('" + key + "', '" + value + "')" ) ; xPathLocator = "//*[@" + key + "='" + value + "']" ; } return xPathLocator ; }
unique attribute value