Forum Discussion

Kanika's avatar
Kanika
Contributor
10 years ago

Not able to enter text in rich text editor which is a iframe object.

I am not able to enter text in rich text editor. It is an iframe object. When I enter text manually in an editor and do object spy then a child of frame get added named TextNode(0).

 

Content Text area source code is :

<!DOCTYPE><html><head xmlns="http://www.w3.org/1999/xhtml"><meta http-equiv="X-UA-Compatible" content="IE=7" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link type="text/css" rel="stylesheet" href="" /><link type="text/css" rel="stylesheet" href="" /></head><body id="tinymce" class="mceContentBody " onload="window.parent.tinyMCE.get('freeTextEditorquestion4').onLoad.dispatch();"><br></body></html>Editor.PNG

Can you please suggest how can I insert text in the above text box using vbscript in TestComplete?

  • Kanika's avatar
    Kanika
    10 years ago
    Hi Tanya,

    Thanks for the reply. I am using IE8. I tried click() and then keys("abc") on frame object and it worked. Is this correct approach or its just workaround?

    - kanika
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Kanika,

     

    What browser are you using?

    Some browsers block the access to contents of cross-origin framesets (when a host of an HTML frame differs from the host of the parent page). Please check if this is the case.

    For more information, please read the "Considerations for Web Testing" ( http://smartbear.com/viewarticle/55654/ ) help topic.

    • Kanika's avatar
      Kanika
      Contributor
      Hi Tanya,

      Thanks for the reply. I am using IE8. I tried click() and then keys("abc") on frame object and it worked. Is this correct approach or its just workaround?

      - kanika
      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        Hi,

         

        It sounds ok. Perhaps, the editor requires activating before typing inside it. When you click over it, it’s become activated.