Sendkeys is not implemented at the level of the frame object in
Watir.  See 
http://rubydoc.info/gems/watir/2.0.4/Watir/IE#send_keys-instance_method

On Jan 16, 6:28 pm, Joe Fl <[email protected]> wrote:
> Hi,
>
>
>
>
>
>
>
> >>> I am working with IE7 and need to add a comment to rich text editor
> >>> that is kept within a iframe.  My current code works with Firefox but
> >>> when I run the same code against IE i get the following error message:
>
> >>> C:/Ruby193/lib/ruby/gems/1.9.1/gems/windows-api-0.4.0/lib/windows/
> >>> api.rb:4: Use RbConfig instead of obsolete and deprecated Config.
> >>> C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-2.0.4/lib/watir/element.rb:
> >>> 447:in `method_missing': undefined method `send_keys' for
> >>> #<Watir::Frame:0x12f65b8> (NoMethodError)
> >>>        from test_123.rb:37:in `<main>'
>
> >>> Here is my code:
> >>>  #Add comment to Compose
> >>>    if @browser.frame(:id,"roundtable_descriptionWidgIframe").exists?
> >>>            puts "Option 1"
> >>>      @browser.frame(:id,"roundtable_descriptionWidgIframe").send_keys
> >>> "Comment #{txt_fld_data}"
> >>>    else
> >>>            puts "Option 2"
> >>>      @browser.frame(:title,/Rich text editor/).send_keys "Comment
> >>> #{txt_fld_data}"
> >>>    end
>
> >>> Here is the HTML:
> >>> span class="cke_browser_gecko" role="presentation">
> >>> <span class="cke_wrapper cke_ltr" role="presentation">
> >>> <table class="cke_editor" cellspacing="0" cellpadding="0" border="0"
> >>> role="presentation">
> >>> <tbody>
> >>> <tr role="presentation" style="-moz-user-select: none;">
> >>> <tr role="presentation">
> >>> <td id="cke_contents_roundtable_description" class="cke_contents"
> >>> role="presentation" style="height:200px">
> >>> <iframe frameborder="0" allowtransparency="true" tabindex="0" src=""
> >>> title="Rich text editor, roundtable_description, press ALT 0 for
> >>> help." style="width:100%;height:100%">
> >>> <html class="CSS1Compat" lang="en" dir="ltr">
> >>> </iframe>
> >>> </td>
> >>> </tr>
> >>> <tr role="presentation" style="-moz-user-select: none;">
> >>> </tbody>
> >>> </table>
> >>> <style>
> >>> </span>
> >>> </span>
>
> >>> Thank you,
> >>> Joe

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

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to