- If you are using the Classic Agent, links in your application are objects of type
HtmlLink.
- If you are using the Open Agent, links in your application are objects of type
DomLink.
Silk Test Classic provides several methods that let you get their text properties as well as the location to which they jump.
Classic Agent Example
The following code returns the definition for the
HtmlLink on a sample home page:
STRING sJump
sJump = Acme.LetUsKnowLink.GetLocation ()
Print (sJump)
Result:
mailto:support@acme.com
Open Agent Example
The following code returns the definition for the
DomLink on the sample home page:
STRING sJump
sJump = WebBrowser.BrowserWindow.LetUsKnowLink.GetProperty("href")
Print(sJump)
Result:
mailto:support@acme.com