Frage

I'm automating an application which use FCK editor. I'm using Telerik as automation tool. Telerik records the following actions click on the FCK editor, type something and click submit. It will record the actions properly but its fail to run.

War es hilfreich?

Lösung

If you can't use the designer to do this, you can always rely on the coded approach. See the following Telerik Test Studio documentation link. The demo the documentation has is this. This can be modified to work with the FCK editor.

// Call a JavaScript function with parameters
// NOTE: It is important to enclose literal string parameter with double quote and not single
// quotes. IE will fail if you don't do so.
Actions.InvokeScript(@"Test2(""WebAii"", 4)");

// Call a JavaScript function and get its return values
string jsRetValue = Actions.InvokeScript("Test3();");
// Call a JavaScript function that returns a value
int val = Actions.InvokeScript<int>(@"Test3(""Bear"", ""Utah"")");

I don't know the exact API of the FCK editor, so I can't provide more info specific to that. But to work with an API, you can render script to do this.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top