开发者

How do I get all the <li> elements from within a div using Watin?

I have never used Watin before today. I need to开发者_如何学JAVA get a collection of 'li' elements that are within a 'div'

<div id="myDiv">
  <ul>
    <li>a</li>
    <li>b</li>
    <li>c</li>
  </ul>
</div>

I only want the li elements within the div id='myDiv'..

Thanks for any help!


Got it..

var liList = _browser.Div("myDiv").ElementsWithTag("li");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜