无法单击"新应用程序或充值"标签内存在的文本 <td> watir/ruby



我正在尝试单击<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>

Watir 允许使用:text参数进行StringRegExp匹配:

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

browser.td(text: /New Application/)

相关内容

最新更新