Home > Uncategorized > Not able to find SilverlightHyperlink control

Not able to find SilverlightHyperlink control


public static SilverlightHyperlink FindSilverLightHyperLinkByID(this UITestControl uiTestControl, string id)
{
if (uiTestControl == null) throw new ArgumentNullException(“uiTestControl”);
if (id == null) throw new ArgumentNullException(“id”);

SilverlightHyperlink silverLightHyperLink = new SilverlightHyperlink(uiTestControl);
silverLightHyperLink.SearchProperties.Add(new PropertyExpression(SilverlightHyperlink.PropertyNames.AutomationId, id, PropertyExpressionOperator.EqualTo));

return silverLightHyperLink;
}

please check weather you have loaded hyperlink control in your silver light page or not. Untile u load that controls first u can’t read that control using coded ui test.

Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment