我必须选择类似于下拉框但不是实际下拉框的字段。选择字段在包含值和子值的弹出窗口中显示值,我需要选择值。
面临的问题:
无法识别对象并且无法从字段中选择值。
我尝试让 cssSelector 识别对象:“ div[class='mailval'][title='Breast > Both'] ”。它不工作。
以下是 HTML 代码:
<div class="rowDiv ">
<label for="bodypart">Body Part</label>
<div id="bodypart_box_1">
<div style="position:absolute;left:185px;z-index: 20">
<ul class="parent">
<li>
<div id="main" class="mailval">events=Object { click=[1]}handle=function()
<input id="bodypart_1" class="bodypart" type="text" onfocus="if($(this).hasClass('disabled')){$(this).blur();}" readonly="readonly" value="Select One" name="bodypart_1" title="">
<input id="actualBodypart_1" type="hidden" value="Breast" name="actualBodypart_1">
</div>
<ul id="bodyPartList_1" class="top sub bodyPartList" style="display: none;">olddisplay="block"
<li>
<div class="mailval fly" title="Breast" originaltitle="Breast">Breast</div>events=Object { click=[1], mouseover=[1]}handle=function()
<ul>
<li>
<div class="mailval" title="Breast > Both" originaltitle="Breast > NULL > Both">Both</div>events=Object { click=[1], mouseover=[1]}handle=function()
</li>
<li>
<div class="mailval" title="Breast > Left" originaltitle="Breast > NULL > Left">Left</div>events=Object { click=[1], mouseover=[1]}handle=function()
</li>
<li>
<div class="mailval" title="Breast > Right" originaltitle="Breast > NULL > Right">Right</div>events=Object { click=[1], mouseover=[1]}handle=function()
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div style="clear:both"></div>
</div>
<p id="bodypart-error" class="errorMessage ml161px pa ie7ErrorFix" style="top:140px !important"></p>
</div>