by  inflectra.adam 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

Selected files will be attached to any email sent on saving ticket.

file selected files selected  () Delete Selected

  • Created:
  • by:

Select files to upload

Or drag and drop files here

Uploading …
Done!
Upload More?
There was an error.
Try again?

Save to upload the selected file(s)

Article Info
  • Last Updated: 12/15/2015
  • Article ID: KB96
  • Views: 7743