<div id="isc_3B" class="scrollingMenu" onscroll="return isc_PickListMenu_0.$lh()" style="position: absolute; left: 403px; top: 63px; width: 450px; height: 298px; z-index: 800684; visibility: inherit; padding: 0px; box-sizing: border-box; overflow: hidden;" role="listbox" eventproxy="isc_PickListMenu_0" aria-hidden="false">
<div id="isc_3C" style="position: relative; display: inline-block; box-sizing: border-box; width: 100%; vertical-align: top; visibility: inherit; z-index: 800684; cursor: default;" eventproxy="isc_PickListMenu_0">
<div id="isc_3D" role="toolbar" tabindex="-1" onblur="if(window.isc)isc.EH.blurFocusCanvas(isc_Toolbar_1,true);" onfocus="if(event.target!=this)return;isc.EH.focusInCanvas(isc_Toolbar_1,true);" onscroll="return isc_Toolbar_1.$lh()" style="position: absolute; left: 0px; top: 0px; width: 434px; height: 22px; z-index: 200936; overflow: hidden; box-sizing: border-box; cursor: default; display: inline-block;" eventproxy="isc_Toolbar_1">
<div id="isc_3A" class="pickListMenuBody" tabindex="1439" onblur="if(window.isc)isc.EH.blurFocusCanvas(isc_PickListMenu_0_body,true);" onfocus="if(event.target!=this)return;isc.EH.focusInCanvas(isc_PickListMenu_0_body,true);" onscroll="return isc_PickListMenu_0_body.$lh()" style="position: absolute; left: 0px; top: 22px; width: 434px; height: 276px; z-index: 201026; overflow: hidden; background-color: white; box-sizing: border-box; cursor: default; display: inline-block; outline-style: none;" eventproxy="isc_PickListMenu_0_body">
<div id="isc_3N" style="position:absolute;overflow:visible;z-index:1000;width:432px">
<div id="isc_PickListMenu_0_body$28s" style="width:1px;height:0px;overflow:hidden;display:none;">
<table id="isc_3Atable" class="listTable" width="432" cellspacing="0" cellpadding="2" border="0" style="table-layout:fixed;overflow:hidden;padding-left:0px;padding-right:0px;" role="presentation">
<tbody></tbody>
<colgroup>
<tbody>
<tr id="isc_PickListMenu_0_row_0" aria-posinset="1" aria-setsize="686" role="option" aria-selected="false">
<td class="pickListCell" height="16" align="left" style="padding-top: 0px; padding-bottom: 0px; width: 143px; overflow: hidden;">
<div style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;WIDTH:139px;" cellclipdiv="true" role="presentation">Pens Stabiliner 808 Ballpoint Fine Black</div>
</td>
<td class="pickListCell" height="16" align="left" style="padding-top: 0px; padding-bottom: 0px; width: 144px; overflow: hidden;">
<div style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;WIDTH:140px;" cellclipdiv="true" role="presentation">Ea</div>
</td>
<td class="pickListCell" height="16" align="left" style="padding-top: 0px; padding-bottom: 0px; width: 145px; overflow: hidden;">
</tr>
<tr id="isc_PickListMenu_0_row_1" aria-posinset="2" aria-setsize="686" role="option">
<td class="pickListCellDark" height="16" align="left" style="WIDTH:143px;OVERFLOW:hidden;padding-top:0px;padding-bottom:0px;;white-space: nowrap;">
<td class="pickListCellDark" height="16" align="left" style="WIDTH:144px;OVERFLOW:hidden;padding-top:0px;padding-bottom:0px;;white-space: nowrap;">
<td class="pickListCellDark" height="16" align="left" style="WIDTH:145px;OVERFLOW:hidden;padding-top:0px;padding-bottom:0px;;white-space: nowrap;">
</tr>
<tr id="isc_PickListMenu_0_row_2" aria-posinset="3" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_3" aria-posinset="4" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_4" aria-posinset="5" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_5" aria-posinset="6" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_6" aria-posinset="7" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_7" aria-posinset="8" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_8" aria-posinset="9" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_9" aria-posinset="10" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_10" aria-posinset="11" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_11" aria-posinset="12" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_12" aria-posinset="13" aria-setsize="686" role="option">
**<tr id="isc_PickListMenu_0_row_13" aria-posinset="14" aria-setsize="686" role="option" aria-selected="true">
<td class="pickListCellSelectedDark" height="16" align="left" style="padding-top: 0px; padding-bottom: 0px; width: 143px; overflow: hidden;">
<div style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;WIDTH:139px;" cellclipdiv="true" role="presentation">Adding Machine Roll 57x57mm Lint Free</div>
</td>
<td class="pickListCellSelectedDark" height="16" align="left" style="padding-top: 0px; padding-bottom: 0px; width: 144px; overflow: hidden;">
<td class="pickListCellSelectedDark" height="16" align="left" style="padding-top: 0px; padding-bottom: 0px; width: 145px; overflow: hidden;">
</tr>**
<tr id="isc_PickListMenu_0_row_14" aria-posinset="15" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_15" aria-posinset="16" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_16" aria-posinset="17" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_17" aria-posinset="18" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_18" aria-posinset="19" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_19" aria-posinset="20" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_20" aria-posinset="21" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_21" aria-posinset="22" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_22" aria-posinset="23" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_23" aria-posinset="24" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_24" aria-posinset="25" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_25" aria-posinset="26" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_26" aria-posinset="27" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_27" aria-posinset="28" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_28" aria-posinset="29" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_29" aria-posinset="30" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_30" aria-posinset="31" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_31" aria-posinset="32" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_32" aria-posinset="33" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_33" aria-posinset="34" aria-setsize="686" role="option">
<tr id="isc_PickListMenu_0_row_34" aria-posinset="35" aria-setsize="686" role="option">
</tbody>
</table>
<div id="isc_PickListMenu_0_body$284" style="width:1px;height:10416px;overflow:hidden;">
<table style="position:absolute;top:0px;font-size:1px;height:100%;width:100%;z-index:1;overflow:hidden;visibility:hidden;">
</div>
</div>
<div id="isc_3Q" class="scrollbar" onscroll="return isc_PickListMenu_0_body_vscroll.$lh()" style="position: absolute; left: 434px; top: 22px; width: 16px; height: 276px; z-index: 201027; overflow: hidden; box-sizing: border-box; cursor: default; display: inline-block;" dir="ltr" eventproxy="isc_PickListMenu_0_body_vscroll">
<div id="isc_3R" class="vScrollThumb" aria-label=" " onscroll="return isc_PickListMenu_0_body_vscroll_thumb.$lh()" style="position: absolute; left: 434px; top: 38px; width: 15px; height: 20px; z-index: 201033; overflow: hidden; box-sizing: border-box; cursor: default; display: inline-block;" eventproxy="isc_PickListMenu_0_body_vscroll_thumb">
<div id="isc_3O" class="scrollbarDisabled" onscroll="return isc_PickListMenu_0_body_hscroll.$lh()" style="position: absolute; left: 0px; top: 22px; width: 1px; height: 1px; z-index: 201027; overflow: hidden; box-sizing: border-box; cursor: default; display: inline-block; visibility: hidden;" dir="ltr" eventproxy="isc_PickListMenu_0_body_hscroll" aria-hidden="true">
<div id="isc_3P" class="hScrollThumb" aria-label=" " onscroll="return isc_PickListMenu_0_body_hscroll_thumb.$lh()" style="position: absolute; left: 16px; top: 22px; width: 5px; height: 1px; z-index: 201033; overflow: hidden; box-sizing: border-box; cursor: default; display: inline-block; visibility: hidden;" eventproxy="isc_PickListMenu_0_body_hscroll_thumb" aria-hidden="true">
<div id="isc_3T" aria-label="corner menu" role="button" tabindex="1490" onblur="if(window.isc)isc.EH.blurFocusCanvas(isc_PickListMenu_0_sorter,true);" onfocus="if(event.target!=this)return;isc.EH.focusInCanvas(isc_PickListMenu_0_sorter,true);" onscroll="return isc_PickListMenu_0_sorter.$lh()" style="POSITION:absolute;LEFT:434px;TOP:0px;WIDTH:16px;HEIGHT:22px;Z-INDEX:200942;OVERFLOW:hidden;box-sizing:border-box;CURSOR:default;display:inline-block" eventproxy="isc_PickListMenu_0_sorter">
</div>
</div>
</body>
您是否有任何想法如何使用python webdriver从该菜单中选择选项?在这种情况下,selenium根本没有帮助。我试图通过行ID,名称文本和它无法正常工作来选择它
每个tr都是下拉菜单中的选项,如: 的 &GT; 添加机器辊57x57mm不含棉绒
答案 0 :(得分:0)
根据您的例子,您可以使用:
select = Select(driver.find_element_by_xpath("//div[contains(text(), 'Adding Machine Roll 57x57mm Lint Free')]"))