title: Find and click a link with text - Coded UI
body: <p>I am trying to create a test that finds a specified link on a web page and clicks it. What I am attempting to do is search for the link by specifying the name/text of the link. Is there a way to create a hyperlink object solely by specifying this?</p>
  
  <p>I can do the following to find the link by specifying the href property like this:</p>
  
  <pre><code>     BrowserWindow browser = BrowserWindow.Locate("Window Title");
       var hyperlink = new HtmlHyperlink(browser);
       hyperlink.SearchProperties.Add(HtmlHyperlink.PropertyNames.Href, "link.com");
       Mouse.Click(hyperlink);
  </code></pre>
  
  <p>But I want to do the same thing by specifying the text/name of the link.</p>
  
  <p>Any help would be appreciated! Thanks</p>