通过Children选择根节点

Example 1:

<table id='table2'>

  <tr class='row1' id=BPT>

    <td>View ID</td>

    <td><input type='button' value='Button 4' class='btn_blue'></td>

  </tr>

  <tr class='row2' id=QC>

    <td>View Address</td>

    <td><input type='button' value='Button 5' class='btn_blue'></td>

  </tr>

  <tr class='row3' id=QTP>

    <td>View Phone Number</td>

    <td><input type='button' value='Button 6' class='btn_green'></td>

  </tr>

 

In QTP:

'Select the PARENT table of Button 6

Browser("XPath").WebElement("xpath:=((//INPUT[@value='Button 6'])[1])/../../..").Click

 

posted @ 2013-11-21 09:11  dushuai  阅读(124)  评论(0编辑  收藏  举报