Knowledge Base Article

Home Page > Knowledge Base > Rapise

Home Page > Knowledge Base > Rapise > Rapise Web

Article How to automate the testing of Rich Text Boxes using Rapise

by Adam S on Tuesday, December 15, 2015

When you have a rich text box in a web application, the process for recording a test and playing it back will be different to a standard HTML plain text box. This is because the browser actually uses a separate IFRAME and HTML document for the editable rich text box. This article explains the process for recording/playing back such a test.

If for example you have the following rich text box:

When you record the test script in Rapise, simply click once in this text box and it will record a single Click against the object:

SeS('HTML').DoClick();

Where the HTML object has an XPATH that looks like the following:

/html/body/div/iframe[@id='AttachedFileDescription_ifr']@@@/html

This tells Rapise that this is an IFRAME with its own HTML document.

To actually enter text into this box, you need to use the following lines of code instead of this single click:

SeS('HTML').DoEnsureVisible();
SeS('HTML').DoMouseMove(0, 0);
SeS('HTML').DoLClick();
SeS('HTML').DoSendKeys('hello mum');

Note: If you are using the TinyMCE editor, there is another more reliable way to automate the testing.

Attachments
Article Info
Last Updated: 12/15/2015
Article ID: KB96
# Views: 7360
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.