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