Hi Ahmed,
I am already using the latest TinyMCE release (3.2.0.2) and the latest nightly of WebTest (R1723). Here is a more complete snippet of my test:

<webtest>
   &config;
   <steps>
      &login;
      <invoke url="/entity/start.act" />

      <setInputField htmlId="wysiwyg_editor" value="foo" />

      <clickButton xpath="//[EMAIL PROTECTED]'formsubmit']" />
   </steps>
</webtest>

and a portion of the stacktrace:
[clickButton] DEBUG (com.canoo.webtest.steps.Step) - Handling exception com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "body" from null (http://localhost:8080/javascript/tiny_mce-3.1.0.1/tiny_mce.js#1 )
[clickButton] ======= EXCEPTION START ========
[clickButton] EcmaError: lineNumber=[1] column=[0] lineSource=[function () {] name=[TypeError] sourceName=[http://localhost:8080/javascript/tiny_mce-3.1.0.1/tiny_mce.js ] message=[TypeError: Cannot read property "body" from null (http://localhost:8080/javascript/tiny_mce-3.1.0.1/tiny_mce.js#1 )]


A similar test functions properly on pages that do not utilize a TinyMCE editor.

Our app sits behind a firewall and it would take a bit of time to get a public facing instance up and running. I can do this if we cannot reproduce this issue elsewhere.

Thank you!
Michael


On Oct 27, 2008, at 11:56 AM, Ahmed Ashour wrote:

Dear Michael,

Using latest TinyMCE version (3.2.0.2), I have another exception, which I will try to fix:

Cannot find function parentElement in object [object]. (http://localhost/tinymce/jscripts/tiny_mce/tiny_mce_src.js#3419 )

Can you please upgrade and advise if you have a different error? or can you post URL to test against so we have a reproducible case?

Ahmed
From: Michael Westphal <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, October 27, 2008 6:02:59 PM
Subject: [Webtest] Controlling TinyMCE with WebTest

Greetings All,
We use the TinyMCE rich-text editor extensively in our Web Application and I am having trouble controlling TinyMCE using WebTest. I simply need to add text into the editor.

I tried using the setInputField step on the textarea that TinyMCE uses, with no luck.

Here's my step code:
<setInputField htmlId="wysiwyg_editor" value="foo" />

Which results in the following error on test execution:
"Cannot read property "body" from null (http://localhost:8080/javascript/tiny_mce-3.1.0.1/tiny_mce.js#1 )"

Interestingly, the error is not thrown on the setInputField step, rather the clickButton step that submits the form.

Has anyone successfully used WebTest with pages using a TinyMCE editor, and if so could you provide me some direction?

Thank You!
Michael



Reply via email to