07th Dec 2009

Find HTML Editor in QTP

Follow below steps to read and write contents from an HTML Editor if you are testing using QTP

Step 1: QTP by default can not find an HTML Editor so you have to add HTML Editor in object repository. It will add HTML Editor as a frame.

See below image for an example

HTML Editor

Step 2:  Below is an example of how to write contents in an HTML Editor. Write below line once you have added HTML Editor as an object.

Browser(”NewRelease”).Page(”Registration”).Frame(”Frame_2″).Object.write “Testing of add news page.”

Step 3: Below is an example of how to read contents from an HTML Editor.

fName = browser(” New Release”).Page(“ Registration “).Frame(”Frame_2″).WebElement(”testing”).Object.innerText

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • HackerNews
  • Ping.fm
  • Posterous
  • Propeller
  • Reddit
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks

One Response to “Find HTML Editor in QTP”

  1. simi Says:

    First of all. Thanks very much for your useful post.

    I just came across your blog and wanted to drop you a note telling you how impressed I was with the information you have posted here.

    Please let me introduce you some info related to this post and I hope that it is useful for software testing community.

    There is a good Software Testing resource site, Have alook

    http://SoftwareTestingNet.com

    simi

Leave a Reply