使用watin在unorder列表中查找标记 [英] Find tag in unorder list using watin

查看:90
本文介绍了使用watin在unorder列表中查找标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想在我的asp.net应用程序中使用watin找到列表项目(li)下的锚标签。



并且还要计算无序列表中的列表项元素的数量((ul)的子项)。



任何人都可以建议我一些解决方案?







例如:

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 :

<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>

推荐答案

您好,



尝试访问这些链接:



http://www.go4expert .com / forums / showthread.php?t = 1947 [ ^ ]

http://stackoverflow.com/questions/4026485/how-to-iterate-through-ul-list-using-javascript [ ^ ]



这可能会有所帮助你...

一切顺利..
Hi,

Try visiting these links:

http://www.go4expert.com/forums/showthread.php?t=1947[^]
http://stackoverflow.com/questions/4026485/how-to-iterate-through-ul-list-using-javascript[^]

This may help you..
All the best..


如果你想获得ul或li,你可以尝试下面的代码:



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

browser.ListItems[index].Links[index]



当你写


when you write

browser.ListItems

您可以访问浏览器或页面中的所有(li)并获取(li)

you can access all of (li) in the browser or page and get all of elements or tags in the (li)

中的所有元素或标签

这篇关于使用watin在unorder列表中查找标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆