Hello,
You have to use CKEditor via Javascript, after the component has fully
rendered.
I don't have a Watir script handy, but here's how I did with Selenium:
selenium.waitForCondition("var x =
selenium.browserbot.findElementOrNull('//t...@id=\"cke_contents_userForm:userstory\"]');
x != null;", "50000");
selenium.runScript("CKEDITOR.instances['userForm:userstory'].setData('<p>Data</p>');");
My Watir skills are a bit rusty, but I think you should take this route:
Waiter.wait_until(20,5) do
browser.element_by_xpath("//t...@id='cke_contents_userForm:userstory']").exists?
end
browser.execute_script("CKEDITOR.instances['userForm:userstory'].setData('<p>Data</p>');")
Good luck,
FK
On Mon, Jul 12, 2010 at 4:26 AM, Soori <[email protected]> wrote:
> All,
>
> I have a form with CKEDITOR for fields. I am not able to input data to
> the CKEDITOR through my WATIR Script. I am getting the following
> error,
>
> OLE error code:800A083E in htmlfile
> Can't move focus to the control because it is invisible, not
> enabled, or of a type that does not accept the focus.
> HRESULT error code:0x80020009
> Exception occurred. from c:/ruby/lib/ruby/gems/1.8/gems/
> watir-1.6.5/lib/watir/input_elements.rb:333:in `set'
> from MyTest.rb:29
>
> Please help me on this.
>
> /Soori
>
> --
> 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]<watir-general%[email protected]>
>
--
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]