我試圖讓我的腳本單擊一個名爲Enter Response的按鈕,該按鈕位於與特定文本(SID)相同的行中。我能夠單獨找到兩者,但似乎無法使兩者同時工作。Selenium IDE單擊由文本標識的行中的按鈕
該表是動態的,所以我使用SID,發現它是行,然後想單擊它的響應按鈕。 I.E.找到文本'123456'&點擊同一行中的'Enter Response'。
我試過這個,但得到一個找不到的錯誤定位器: // tr/td/a [@ class ='title-abbr'and text()='123456']/following-sibling :: td /一個[文本()= '輸入響應']
錶行標題: 標題/出處/來源ID/SID /創建日期/(回車響應按鈕)/表單類型
<tr>
<td class="t-Report-cell" headers="TITLE_ABBR">this is my title</td>
<td class="t-Report-cell" headers="SOURCE_NAME">source1</td>
<td class="t-Report-cell" headers="SOURCE_NUMBER">142417</td>
<td style="background-color: rgb(13, 13, 13);" class="t-Report-cell" headers="SID_ABBR">
<a href="javascript: void(0);" title="123456" class="title-abbr" style="text-decoration: none; background-color: transparent;">123456</a>
</td>
<td class="t-Report-cell" headers="TRANSACTION_DATE">07/28/2016</td>
<td style="background-color: rgb(13, 13, 13);" class="t-Report-cell" headers="LINK" align="center">
<a style="background-color: rgb(0, 255, 255);" class="response-btn" href="f?p=58117:50:27077013481519::NO::P50_TRIGGER_ID:321860">Enter Response</a>
</td>
<td class="t-Report-cell" headers="FORM_TYPE">Questions</td>
</tr>
任何幫助將非常感謝!
非常感謝!它工作得很好:)並感謝您的解釋和提示。現在它變得更有意義! – autojay