I am wanting to test a web application which uses FCKeditor in Selenium IDE. Unfortunately, FCKeditor uses iframes, which are difficult to test in Selenium IDE. Basically, all I want to do is set the value of the FCKeditor editing area and read it later to see if the value was submitted correctly.
I suppose this question is two-fold: first of all, does anyone have an FCKeditor-specific solution to this problem? and secondly, does anyone know of a good way to implement custom Javascript functions that can be used in your tests in Selenium IDE?
I have come up with a solution. It involves using Selenium IDE’s
storeEvalmethod,storedVarsvariable, and anonymous functions. It also exploits theactiveElementproperty of theiframes.Basically, what I do is call the
storeEvalmethod with javascript to set a certain element ofstoredVarsto the function I will use later as the argument. For theFCKeditorexample the argument would be:I have formatted it like that on purpose because that is the way it would show up in Selenium IDE, and I it is obviously less than ideal.
Then, later, when I actually want to set the value of the FCKeditor field, I call
storeEvalagain with javascript to call the function as the argument, like so:This works, but I am hoping there is a better way. Would Selenium RC make this easy?