Xpath 无法识别使用Selenium RC和eclipse动态的下拉框
这是描述下面下拉框的HTML代码的一部分Xpath 无法识别使用Selenium RC和eclipse动态的下拉框,xpath,selenium-rc,Xpath,Selenium Rc,这是描述下面下拉框的HTML代码的一部分 <select id="f86_optReasonCodes" class="GTOptionMenu GTFillHorizontal optReasonCodes GTDisplay" onchange="this.changed=true;clientAPI.postEvent('f86_optReasonCodes',1);" onblur="looseFocus();" onfocus="gainFocus('f86_optReasonC
<select id="f86_optReasonCodes" class="GTOptionMenu GTFillHorizontal optReasonCodes GTDisplay" onchange="this.changed=true;clientAPI.postEvent('f86_optReasonCodes',1);" onblur="looseFocus();" onfocus="gainFocus('f86_optReasonCodes');" size="1" name="f86_optReasonCodes" title="A list of outcomes to choose from" tabindex="10"></select>
<input id="f86_optReasonCodes_info" type="hidden" value="formID=86,objectID=2,componentType=5"></input>
我收到的错误消息如下。有人能帮我吗
com.thoughtworks.selenium.SeleniumException: ERROR: Element XPath=//select[contains(@id, '_optReasonsCodes')] not found
重新粘贴Html代码这是一个简单的打字错误。您的id包含
optReasonCodes
,您正在搜索optReasonsCodes
(注意s)
com.thoughtworks.selenium.SeleniumException: ERROR: Element XPath=//select[contains(@id, '_optReasonsCodes')] not found