Cybersecurity
DevOps Cloud
IT Operations Cloud
The above error will occur if you attempt to execute a SilkTest VB.NET script on a remote machine (using the “Agent.Connect” call) and the script uses ‘Object Maps ‘. For example, the following sample script.
Imports SilkTest.Ntf.XBrowser
Public Module Main
Dim _desktop As Desktop = Agent.Desktop
Public Sub Main()
Agent.Connect("remoteHost")
With _desktop.BrowserApplication("WebBrowser")
With .BrowserWindow("BrowserWindow")
.DomButton("bSubmit").Click(MouseButton.Left, New Point(124, 12))
.DomTextField("QTY_BOOTS").TypeKeys("<#1>")
.DomButton("bSubmit").Click(MouseButton.Left, New Point(60, 4))
End With
End With
End Sub
End Module
will return the error “SilkTest.NTF.ObjectMapIdentifierNotFoundException: Identifier ‘WebBrowser” was not found in the Object Map”.
The reason why is that there is a limitation in the SilkTest Workbench which means that when you use “Agent.Connect” to a remote machine you will have to use raw locators instead of object map entries as the remote agent you are connected to does not know anything about the local object map. Therefore you will either have to
1) Replace your object map entries with the corresponding raw locators; for example:
With _desktop.BrowserApplication("WebBrowser")
With .BrowserWindow("BrowserWindow")
Would become:
With _desktop.BrowserApplication("/BrowserApplication")
With .BrowserWindow("//BrowserWindow")
2) Go to “Tools | Options | Record | General” and set “Record Object Maps” to No; before recording your VB.NET script once again