API Click Versus Agent Click

This functionality is supported only if you are using the Classic Agent.

By default, Silk Test Classic issues API-based clicks rather than Agent-based clicks to improve the reliability of recorded and scripted clicks in HTML applications. An API click is generated internally by the browser, instead of the Silk Test Classic Agent. API clicks are more reliable than Agent clicks, which can click the wrong location of an object.

By default, Silk Test Classic issues API clicks instead of Agent-based clicks for the following Html classes and method combinations:

Class Method
HtmlCheckBox
  • Click
  • Check
  • UnCheck
  • Toggle
HtmlColumn Click
HtmlHeading Click
HtmlImage Click
HtmlLink Click
HtmlMarquee Click
HtmlPushButton Click
HtmlRadioButton Click
HtmlRadioList Select
HtmlText Click
HtmlTextField Click

API Clicks and OnClick JavaScript Events

Generally, API-based clicks behave just like the Agent-based clicks. If an HTML object has an OnClick JavaScript event, an API click should cause the event to fire as normal. However, on HtmlText objects an API click may not trigger an OnClick event in the same way an Agent click does.

This could happen because HtmlText might not map to a single element within the HTML. The API click could apply to a different element than the one containing the OnClick event. If API clicks on HtmlText do not start the expected events, you should use Agent clicks instead.