Identification of a href link

3 posts, 0 answers
  1. Nalin
    Nalin avatar
    2 posts
    Member since:
    Nov 2013

    Posted 11 Sep 2014 Link to this post

    Hi,

    I am trying to identify a href link which doesnt contain any unique property,i have used  htmlhyperlink,htmlcontrol but i am unable do so.

    Kindly help me out ASAP

    Thanks
    Nalin
  2. Nalin
    Nalin avatar
    2 posts
    Member since:
    Nov 2013

    Posted 11 Sep 2014 in reply to Nalin Link to this post

    Hi,

    i am using Telerik WebAii automation framework to do the same.

    Thanks
    Nalin
  3. Boyan Boev
    Admin
    Boyan Boev avatar
    1043 posts

    Posted 16 Sep 2014 Link to this post

    Hi Nalin,

    Thank you for contacting us.

    Please send us a screen shot of the DOM structure so we can find a reliable find logic for the link.

    You can find it by using HtmlAnchor which inherits HtmlControl. Here is a code sample which finds a link via its href.

     
    HtmlAnchor myLink = ActiveBrowser.Find.ByAttributes<HtmlAnchor>("href=http://www.bing.com");

    Hope this helps.

    Regards,
    Boyan Boev
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top