Click here to Skip to main content
15,885,839 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

I want to find the anchor tag which is under list item (li) using watin in my asp.net application .

And also want to count no of list item elements in unordered list (children of (ul)) .

Can anyone suggest me some solution ?



Example :
C#
<div>
<ul>
<li>
 <h4>
    <a href="http://www.xyz.com/MySite/">ABCD</a>
 </h4>
</li>

<li>
 <h4>
    <a href="http://www.abc.com/MySite/">XYZ</a>
 </h4>
</li>
.
.
.
.
.
</ul>
</div>
Posted
Comments
Reza Ahmadi 23-Apr-12 4:57am    
What is 'watin'?

 
Share this answer
 
if you want to get ul or li you can try below code:

C#
browser.ListItems[index].Links[index]

when you write
C#
browser.ListItems
you can access all of (li) in the browser or page and get all of elements or tags in the (li)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900