Entering values in wysiwyg editor.
I'm currently "stuck" trying to enter values into a wysiwyg editor (CKeditor) in a javascript scenario (Selenium2 driver). I'm able to find the element with an XPath query, but can't seem to figure out how to enter values properly in order to submit my form.
How would I go about entering values into a wysiwyg? Is there a best practice to get this done?
It depends on how your wysiwyg works (CKeditor). If you can't control it through DOM, then you should be able to control it through JS: https://github.com/Behat/Mink/blob/develop/src/Behat/Mink/Session.php#L260-L280
Oh, it didn't occur to me I could do it like this. That should do just fine I think, thanks for the answer!
Facing same error but dont know how to fix the error any one can sample code or and example ?
Facing same error but dont know how to fix the error any one can sample code or and example ?
What "error" are you talking about here, @sohailyasmin ? Doesn't CKEditor controlling through DOM manipulations help in your case?
I am talking about the when i run my behat test for the CK editor it fails and unable to fill value
Can you please be more specific, e.g. provide scenario output.
I'm guessing, that you've initialized CKEditor from existing textarea and then accessing that textarea by name/id and trying to set value to it in hopes, that it will appear in CKEditor too or via versa.
This doesn't work with CKEditor, since it doesn't communicate real-time with textarea after initialization has happened. If you need for CKEditor to resync it's state with textarea, then you need to call special CKEditor methods (better to see CKEditor docs to find out which ones).