【发布时间】:2021-12-13 14:52:05
【问题描述】:
有一个名为“sampleType”的下拉菜单,其中有几个值“AB1、AB2、.. AB6”。
当我手动点击下拉菜单时,默认选择 AB1。
我需要根据用户输入选择其他值,即 AB2-AB6。
我在这里遇到了很多问题,但没有找到合适的。
下面是 HTML sn-p。
请帮助并提前致谢!
<div class="react-select" id="sampleType" role="presentation">
<div class="Select react-select has-outline has-value Select--single">
<input name="sampleType" type="hidden" value="AB1">
<div class="Select-control">
<span class="Select-multi-value-wrapper" id="react-select-sampleType--value" aria-label="Select Menu. AB1 selected.">
<div class="Select-value">
<span class="Select-value-label" role="option" aria-selected="true" id="react-select-sampleType--value-item">AB1</span>
</div>
<div aria-expanded="false" aria-owns="" aria-activedescendant="react-select-sampleType--value" aria-disabled="false" class="Select-input datagrid-row-actions" role="combobox" style="border: 0px none; width: 1px; display: inline-block;" tabindex="0"></div>
</span>
<span class="Select-arrow-zone">
<span class="Select-arrow"></span></span></div></div><div class="footer-height" role="alert"><div class="error"></div></div></div>
【问题讨论】:
-
将您的代码试验和错误添加到问题中
标签: selenium selenium-webdriver robotframework