【发布时间】:2016-05-07 03:42:12
【问题描述】:
我正在为 web ui 测试使用 nighwatch.js,我想为 textarea 设置值,而 textarea 有一个包含我的实际文本的属性,我正在编写完整的 textarea 以及我如何设置以下内容。
<div class="textarea-description">
<textarea cols="50" class="myClass setText" data-def placeholder="text to be replaced using nightwatch"/>
</div>
我正在尝试通过以下方式在 textarea 的属性 data-def placeholder 中设置值
browser.setValue('.textarea-description textarea[type=text]','nightwatch'); or
browser.setValue('.textarea-description textarea[data-def placeholder=text]','nightwatch'); or
browser.setValue('.textarea-description textarea[type=data-def placeholder]','nightwatch');
但没有任何效果。
【问题讨论】:
标签: javascript jquery ui-automation ui-testing nightwatch.js