Tuesday, May 24, 2011

How will you load the object during run time?

How will you load the object during run time?
1. Well, we won’t load objects during runtime, we only instruct QTP to interact with an object so it identifies it during runtime. QTP stores object definitions, or Test Object properties and along with those, it also stores Runtime object properties in its Object Repository. When the test runs, QTP maps these test object properties with the object’s runtime properties. If it successfully maps the runtime properties, test passes. If not, test fails.

If you were asking about creating an instance of a particular application (or process) via QTP, then yes, it can be done using the “CreateObject” function. CreateObject basically creates an instances of an OLE Automation.

For example, I want QTP to initiate an instance of Microsoft Excel, you would do it something like this:

Dim oExcel
Set oExcel=CreateObject(Excel.Application)
oExcel.Launch ‘(Just for reference) Start Excel
oExcel.visible=True ‘(Just for reference) Make Excel Application visible

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

No comments:

Post a Comment