0

<td>我正在尝试单击标签内的“新应用程序或充值”文本:

<button class="BIMG" tabindex="-1" id="T979" name="T979"style="border:0;background-color:transparent;left:14px;top:114px;width:193px;height`enter code here`:23px;z-index:2020; clip:rect(0px 193px 23px 0px);color:#28497b;">
<table class="T" style="top: 4px; left: 10px; width: 183px; height: 19px; font-weight: bold; font-size: 12px; font-family: Arial; color: rgb(40, 73, 123); text-decoration: underline;" cellpadding="0" cellspacing="0">
    <tbody>
          <tr>
              <td style="vertical-align:top;text-align:left;">New Application or Top Up</td>
          </tr>
    </tbody>
 </table>
</button>
4

1 回答 1

1

Watir 允许String&使用参数进行RegExp匹配::text

browser.td(text: "New Application or Top Up")

browser.td(text: /New Application/)

于 2017-07-05T02:30:44.957 回答