F1,需要一些关于使用Robotframework的隐藏元素的帮助或提示。
问题在于,要填充文本区域中的任何文本,我需要将文本区域的状态从display:none;
to display:block;
Code that I see from WebDev Tool
准则本身:
<div class="col-md-12">
<div class="cazary" style="width: 664px;">
<div class="cazary-commands-wrapper">
<ul class="cazary-commands-list">
<li unselectable="on" title="Size" class="cazary-command-fontsize">Size</li>
</ul>
<ul class="cazary-commands-list">
<li unselectable="on" title="Foreground Color" class="cazary-command-forecolor">Foreground Color</li>
</ul>
<ul class="cazary-commands-list">
<li unselectable="on" title="Background Color" class="cazary-command-backcolor">Background Color</li>
</ul>
<ul class="cazary-commands-list">
<li unselectable="on" title="Remove Format" class="cazary-command-removeformat">Remove Format</li>
</ul>
</div>
<iframe class="cazary-edit" src="javascript:" style="height: 39px;"></iframe>
<textarea id="summernote" class="required-preview field cazary-source" placeholder="Tell us all about your Advertisement. This description will be prominently displayed in your Advertisement notice. Feel free to adjust the fonts and background colour too." name="observations" cols="50" rows="10" style="display: none;"></textarea>
</div>
我的Robotframework代码尝试:
^{pr2}$返回的错误: image
是否有一个带有Execute Javascript关键字的解决方案?在
相关的
<textarea>
在<iframe class="cazary-edit">
之外。因此,我们不需要切换到<iframe>
要将文本发送到
Input
字段,您可以尝试:使用
xpath
作为:Click
首先是Input
字段。Clear
字段Input
。在更新:
由于相关的
textarea
将style
属性设置为"display: none;"
,我们必须通过JavascriptExecutor
更改为"display: block;"
然后发送文本。在Python示例代码:
^{pr2}$相关问题 更多 >
编程相关推荐