在我的应用程序中,所有查询编辑器都是Ace编辑器,我需要使用WebDriver键入查询。我曾尝试使用发送密钥,但它似乎不工作。有没有其他方法可以将我的输入发送给Ace编辑器并实现自动化?如何使用WebDriver自动化Ace编辑器(发送密钥)?
下面是我的HTML代码
<div class="" ng-show="queryType=='Spark Query'">
<pre class=" ace_editor ace-xcode">
<textarea class="ace_text-input" wrap="off" autocorrect="off" autocapitalize="off" spellcheck="false" style="opacity: 0; height: 18px; width: 7px; left: 4px; top: 0px;"/>
<div class="ace_gutter" style="display: none;">
<div class="ace_scroller" style="left: 0px; right: 0px; bottom: 0px;">
<div class="ace_content" style="margin-top: 0px; width: 659px; height: 334px; margin-left: 0px;">
<div class="ace_layer ace_print-margin-layer">
<div class="ace_layer ace_marker-layer"/>
<div class="ace_layer ace_text-layer" style="padding: 0px 4px;">
<div class="ace_layer ace_marker-layer"/>
<div class="ace_layer ace_cursor-layer ace_hidden-cursors">
</div>
</div>
有人可以请建议如何使用webDriver实现sendKeys到AceEditor – Pringa