使用selenium RC选择下拉值

使用selenium RC选择下拉值,selenium,selenium-rc,Selenium,Selenium Rc,有一个下拉列表,其中有两个值已启用和已禁用,但该字段具有type=按钮。 我不确定如何在此下拉列表中选择值 下面是该元素的html代码 <button id="loggingTargetStatus" class="dijitReset dijitStretch dijitButtonContents dijitDownArrowButton" waistate="haspopup-true,labelledby-loggingTargetStatus_label" wairole="bu

有一个下拉列表,其中有两个值已启用和已禁用,但该字段具有type=按钮。 我不确定如何在此下拉列表中选择值

下面是该元素的html代码

<button id="loggingTargetStatus" class="dijitReset dijitStretch dijitButtonContents dijitDownArrowButton" waistate="haspopup-true,labelledby-loggingTargetStatus_label" wairole="button" dojoattachpoint="focusNode,titleNode,_arrowWrapperNode" value="" type="button" role="button" aria-haspopup="true" aria-labelledby="loggingTargetStatus_label" tabindex="0" style="-moz-user-select: none;">
<span class="dijitReset dijitInline cpmIconStateEnable" dojoattachpoint="iconNode"></span>
<span id="loggingTargetStatus_label" class="dijitReset dijitInline dijitButtonText" dojoattachpoint="containerNode,_popupStateNode">Enabled</span>
<span class="dijitReset dijitInline dijitArrowButtonInner"> </span>
<span class="dijitReset dijitInline dijitArrowButtonChar">▼</span>
</button>

启用
 
▼

请建议如何使用selenium RC进行选择,因为它不是一个
select
元素,因此您无法与它进行交互。它可能使用AJAX使其看起来像一个选择菜单

您需要在所有适当的元素上单击()。我已经用了很多年了,所以下面的代码可能需要调整

selenium.click("loggingTargetStatus");    // to enable the menu
selenium.click(your_field);    // you will have to find the correct locator
已经被弃用好几年了。您是否无法升级到?您知道这两种API都支持。