[英]Unable to select item (Text) from a specific drop down menu?
目前,我正在尝试与一个下拉菜单进行交互,该菜单仅在单击后才显示特定文本。
<div class="" style="display: inline-block;">
<input autocapitalize="none" autocomplete="off" autocorrect="off" id="react-select-2-input" spellcheck="false" tabindex="0" type="text" aria-autocomplete="list" value="" style="box-sizing: content-box; width: 4px; background: 0px center; border: 0px; font-size: inherit; opacity: 1; outline: 0px; padding: 0px; color: inherit;"><div style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-size: 12px; font-family: sans-serif; font-weight: 300; font-style: normal; letter-spacing: normal; text-transform: none;">
</div>
</div>
从上图可以看到,单击元素时文本是可见的,但是当我检查元素时,看不到任何下拉文本项?
我尝试了以下方法:
有任何想法吗?
一种选择是:
yourOption = element(by.id('react-select-2-input')).
yourOption.Click();
yourOption.sendKeys(Keys.DOWN);
yourOption.sendKeys(Keys.RETURN);
HTML的某处也必须有一个列表,该列表中将具有可供选择的选项。 它可能不是输入的直接父项或子项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.