开发者

cucumber testing for codemirror

开发者 https://www.devze.com 2023-02-12 02:33 出处:网络
I want to write cucumber test (bdd) for filling in codemirror with \"abcd\". But I cannot write When I fill in \"myFrame\" with \"abcd\"

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

精彩评论

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

关注公众号