When you record actions with Silk4NET, Silk4NET checks if existing object map entries can be reused. Silk4NET checks this directly during recording, when a new locator is generated. Silk4NET checks if the object that is currently recorded in the application under test exactly matches an existing object map entry, and if yes, Silk4NET reuses the object map identifier from the object map.
Silk4NET 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