2017-07-04 27 views
0

我試着點擊「新應用程序或充值」的文本是目前<td>標籤中:無法點擊「新應用程序或充值」文本目前裏面的Watir/​​標籤紅寶石

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

您能否請您更好地解釋您的情況,我看到您添加了watir標籤。你是否試圖點擊你測試的元素?你試過什麼了? –

回答

1

的Watir允許使用:text參數String & RegExp匹配:

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

browser.td(text: /New Application/)