It looks like you have the right object, but it has been heavily customized -- as you know. You're probably going to have rewrite the TextField class to support this control.

Fundamentally that means doing ie.text_field(:id, /elm1/).getObject.ole_methods to see what methods are supported and then using trial and error and MS doc to figure out which will help you do what you want...

I'd start by removing the focus call.

Bret

At 12:36 AM 8/23/2005, Thomas Øhrbom wrote:
Hi!
I'm still struggling with this problem so I'm going to try this mailing list once more. Sorry about the repeat...

Our main product uses a javascript HTML-editor (much like TinyMCE[1]) to
let the user create documents to be published.

So far I've not managed to in any way to interact with this HTML-editor
using Watir. Neither manipulating text in the textarea nor accessing the
toolbar buttons works. When trying to input text in the textarea I
always get an error like this:

   irb(main):026:0> ie.text_field(:id, /elm1/).set("Test")
   WIN32OLERuntimeError: focus
       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/site_ruby/1.8/watir.rb:3399:in
           method_missing'
           from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in `set'
           from (irb):26
           from  :0

I realize I might be trying to access the wrong object here, but I've
tried others with no luck. I've also tried using name instead of id.

If anyone can help me sorting out this problem that would be greatly
appreciated.


[1] TinyMCE is a platform independent web based Javascript HTML WYSIWYG
     editor control released as Open Source under LGPL by Moxiecode
     Systems AB. It has the ability to convert HTML TEXTAREA fields or
     other HTML elements to editor instances.
     http://tinymce.moxiecode.com/example_full.php?example=true

Kind regards,
--
Thomas Ohrbom
QA Manager, extend AS
[EMAIL PROTECTED] | http://www.extend.no/
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

_____________________
 Bret Pettichord
 www.pettichord.com


_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to