开发者

cucumber testing for codemirror

I want to write cucumber test (bdd) for filling in codemirror with "abcd". But I cannot write

When I fill in "myFrame" with "abcd" 

The codemirror hides the textarea and the text area is replaced by iframe. If there would have been text area, I would have simply written

When I fill in "myFrame" with "abcd"

But I don't know how to write test for filling in codemirror. May be I need to add custom step. If I could any how know to insert data into iframe, I think my pro开发者_高级运维blem would be solved. I am open to suggestions.


There exists a CodeMirror property on the wrapper DIV (which has class CodeMirror). So you can execute the script :

$('.CodeMirror')[0].CodeMirror.setValue('Your value')

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜