這裏是HTML代碼,我試圖選擇'select customer'下拉菜單。元素應該是「選擇」,但是「div」在硒中出現錯誤
<div id="createTasksPopup_customerSelector" class="customerOrProjectSelector selectorWithPlaceholderContainer at-dropdown-list-btn-ct notSelected">
<table id="ext-comp-1057" class="x-btn-wrap x-btn at-dropdown-list-btn x-btn-over x-btn-focus" cellspacing="0" cellpadding="0" border="0" style="width: auto;">
<tbody>
<tr id="ext-gen397" class=" x-btn-with-menu">
<td class="x-btn-left">
<td class="x-btn-center">
<em unselectable="on">
<button id="ext-gen391" class="x-btn-text" type="button">- Select Customer -</button>
</em>
</td>
<td class="x-btn-right">
</tr>
</tbody>
</table>
</div>
圖片 -
您使用,請填寫您的問題 –
是ID元素是什麼定位是自動生成的,我的意思是它不會改變你每次加載頁面 –
拉夫你好的時候,我使用定位器selectCustomer_XPATH =// div [@ id ='createTasksPopup_customerSelector'],ID元素不會自動生成。我附上新的屏幕截圖,請參閱。謝謝 – karthik