There are two ways to deal with Ckeditor
1)
focus | class=cke_show_borders
typeKeys | class=cke_show_borders | testing content
'cke_show_borders' is a class of body area
2)
runScript | CKEDITOR.instances["editor1"].setData('
testContent
');
'editor1' is instance of Ckeditor
With help of these option you can able to tackle with CKeditor.
Awesome! Thanks ;)
ReplyDeleteHey this works really well thanks.
ReplyDeleteDo you know how the read the data back once set? I have tried many attempts using getData() but could not get it to work.
What you want to perform? Can you please elaborate in detail??
ReplyDeleteMike, you can use
ReplyDeleteString mk = selenium.getValue("locator of that particular field");
I can write in ckeditor using both ways.
ReplyDeleteBut my problem is: on my page I have a button to save/send some data (from ckeditor too) and when Selenium clicks on Save-button, the written data in ckeditor disappear (!?)
Any ideas to solve my problem?
me too I have the same problem
ReplyDelete"I can write in ckeditor using both ways.
ReplyDeleteBut my problem is: on my page I have a button to save/send some data (from ckeditor too) and when Selenium clicks on Save-button, the written data in ckeditor disappear (!?)"
I have the same problem
At the moment, I get around the not saved issue with a "pause 2500" after the set.Data.
ReplyDeleteLess than ideal - but works.
Thanks bud. I spent hours looking for a way to get selenium to enter text in a CKEditor element. Method 2 did the trick.
ReplyDelete