Testing cucumber for codemirror

I want to write a cucumber test (bdd) to populate a codemirror with "abcd". But I can not write

When I fill in "myFrame" with "abcd" 

The code mirror hides the text field, and the text area is replaced by an iframe. If there was a text area, I would just write

 When I fill in "myFrame" with "abcd" 

But I do not know how to write a test to populate codemirror. Maybe I need to add a custom step. If I could figure out how to insert data in an iframe, I think my problem will be solved. I am open to suggestions.

+4
source share
1 answer

In the DIV shell (which has the CodeMirror class), the CodeMirror property exists. This way you can execute the script:

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

+1
source

Source: https://habr.com/ru/post/1340120/


All Articles