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.

Sahi with WYSIWYG Editors

KMANDOKMANDO Members
edited November -1 in Sahi - Open Source
Hi,

Just was having some difficuly getting sahi to _setvalue into a WYSIWYG editor

it doesnt seem to detect the editor when the cursor is within the editor inorder to insert some text,

I was wondering if there would be a command to forcefully print or type out keystrokes to solve this ?



has anyone else run into the same problem?

Comments

  • narayannarayan Administrators
    WYSIWYG editors or rich text editors (rte) are mostly iframes which have the designMode turned on. If you can find the id of the iframe, you can use
    _rteWrite(iframe, textOrHtmlString);
    
    You can either use the iframe object or just pass the iframe's id as the first parameter. Note that currently the whole text is replaced in the rte.
  • Hi,
    _rteWrite(ctl_21, textrightoverhere);
    
    Error:
    ctl_21 is not defined
    
    the current does not work as the cursor is in the editor and all is needed for the keys to be pressed to enter text

    it seems even if using keypress after the cursor is inside the editor it still does not enter any text.
    _keypress(10);
    
    any help would be appreciated

    thanks
  • adminadmin Administrators
    If ctl_21 is the id, it should be quoted.
    _rteWrite("ctl_21", textrightoverhere);
    
Sign In or Register to comment.