When you record actions with Silk Test Workbench, Silk Test Workbench checks if existing object map entries can be reused. Silk Test Workbench checks this directly during recording, when a new locator is generated. Silk Test Workbench checks if the object that is currently recorded in the application under test exactly matches an existing object map entry, and if yes, Silk Test Workbench reuses the object map identifier from the object map.
Silk Test Workbench records the following script when you click on the Products link in the Micro Focus website, http://www.borland.com.
With _desktop.BrowserApplication( "borland_com" ) With .BrowserWindow( "BrowserWindow" ) .DomLink( "Products" ).Click( MouseButton .Left, New Point (47, 18)) End With End With
borland_com //BrowserApplication BrowserWindow //BrowserWindow Products //A[@textContents='Products']
borland_com //BrowserApplication BrowserWindow //BrowserWindow header //HEADER[@role='banner'] Products //A[@textContents='Products']
With _desktop.BrowserApplication( "borland_com" ) With .BrowserWindow( "BrowserWindow" ) .DomElement("header").DomLink( "Products" ).Click( MouseButton .Left, New Point (47, 18)) End With End With