Writing a test that sets content in a TinyMCE instance using a firefox
browser object. My first attempt was this:

firefox.execute_script("tinyMCE.get('editor_id').setContent('some
content')")

This raises "JsshSocket::JSReferenceError:  tinyMCE is not defined"
even though the exact same code works if entered into Firebug.

There's another post here about doing this with IE, getting the
editor's element by ID, setting focus, and typing stuff into it - that
doesn't work with the Firefox browser object.

So here's what I've got working:

firefox.goto("javascript:tinyMCE.get('editor_id').setContent('some
content')")
firefox.back
firefox.wait
# now I can submit the form and the value gets passed from TinyMCE

Anyone know why execute_script doesn't see the tinyMCE JavaScript
object? Is it running in some other context? Anyone have a more
elegant way of doing this?

If not, this works for the next guy trying to do it.

MW

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: [email protected]
To unsubscribe: [email protected]

Reply via email to