我有一個網頁的HTML下面的代碼片段:Selenium中的xPath - 我做錯了什麼?
...
<tbody id="c_scopePane4_tbody">
<tr id="c_scopePane4_tr_header">
...
</tr>
</tbody>
...
現在,我試圖從內硒指定<tr>
標籤使用XPath表達式。這是我嘗試:
//tr[@id='c_scopePane4_tr_header']
這告訴我
[error] locator not found: //tr[@id='c_scopePane4_tr_header'], error = Error:
Element //tr[@id='c_scopePane4_tr_header'] not found
但是,如果我改變XPath表達式:
//*[@id='c_scopePane4_tr_header']
...然後它的作品。是什麼賦予了?