18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Writing into a textarea within an embedded javascript

QAWigQAWig Members
edited November -1 in Sahi - Open Source
Ok...I hope this makes since.

There's a textarea in a javascript editor that allows for editing of the text. SAHI recognizes all of the controls on the editor, but I cannot get any text to enter into the Message area (textarea).

Any Help?

Comments

  • narayannarayan Administrators
    This is a rich text editor (RTE) and not a simple textarea. It mostly uses an iframe in designmode.
    Find out the id of the iframe and use
    function writeToRTE($text){
      _byId("iframeId").contentWindow.document.body.innerHTML += $text; 
    }
    
    _call(writeToRTE("my text"));
    
    Also look at this post which shows how to access FCK editor's RTE. http://sahi.co.in/forums/viewtopic.php?id=9
  • QAWigQAWig Members
    Thanks for the help, but it doesn't quite work. The function you gave me replaces the FCK Editor with the text on the page. I want to be able to put the text into the editor. More help please!

    Thanks!!
  • QAWigQAWig Members
    Issue is resolved! I combined what you sent me with the code you gave the individual dealing with FCK Editors, and I've text in the text area now!
Sign In or Register to comment.