【发布时间】:2014-02-28 22:21:42
【问题描述】:
我正在为 Watir 使用并遇到为
设置值的问题元素。
这是 HTML:
<div comment-editor-area="" class="comment-editor-area" contenteditable="true">
<comment>
<p> "value goes in here"
<br>
</p>
</comment>
</div>
我在使用时得到未定义的方法“set”:
browser.element(:xpath, "//*[@id='comment-editor']/div/div/comment/p" ).set "Value"
谁能帮忙?
错误信息:
NoMethodError: undefined method `set' for #<Watir::HTMLElement:0x..fdae41aef064b3f16 located=false selector={:xpath=>"//*[@id='comment- editor']/div/div/comment/p"}>:Watir::HTMLElement
【问题讨论】:
标签: ruby watir-webdriver paragraph