This is a migrated thread and some comments may be shown as answers.

Identification of a href link

2 Answers 39 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nalin
Top achievements
Rank 1
Nalin asked on 11 Sep 2014, 05:48 PM
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 Answers, 1 is accepted

Sort by
0
Nalin
Top achievements
Rank 1
answered on 11 Sep 2014, 05:51 PM
Hi,

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

Thanks
Nalin
0
Boyan Boev
Telerik team
answered on 16 Sep 2014, 11:37 AM
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
 
Tags
General Discussions
Asked by
Nalin
Top achievements
Rank 1
Answers by
Nalin
Top achievements
Rank 1
Boyan Boev
Telerik team
Share this question
or