Monday, March 23, 2009

Virtual Objects in QTP

Hi ,

Given below is an overview of Virtual Objects in QTP.

virtual objects :
--> You can teach QuickTest to recognize any area of your application as an object by defining it as a virtual object. Virtual objects enable you to record and run tests or components on objects that are not normally recognized by QuickTest.
--> Using the Virtual Object Wizard, you can map a virtual object to a standard object class, specify the boundaries and the parent of the virtual object, and assign it a name. You can also group your virtual objects logically by assigning them to collections.

steps for creating the virtual object :
1. In QuickTest, choose Tools > Virtual Objects > New Virtual Object. Alternatively, from the Virtual Object Manager, click New. The Virtual Object Wizard opens. Click Next.
2. Select a standard class to which you want to map your virtual object.
3. Click Mark Object.
4. The QuickTest window and the Virtual Object Wizard are minimized. Use the crosshairs pointer to mark the area of the virtual object. You can use the arrow keys while holding down the left mouse button to make precise adjustments to the area you define with the crosshairs. Click Next.
5.Click an object in the object tree to assign it as the parent of the virtual object
6. In the Identify object using box, select how you want QuickTest to identify and map the virtual object.

If you want QuickTest to identify all occurrences of the virtual object, select parent only.
QuickTest identifies the virtual object using its direct parent only, regardless of the entire parent hierarchy.
For example, if the virtual object was defined using Browser("A").Page("B").Image("C"), QuickTest will recognize the virtual object even if the hierarchy changes to Browser("X").Page("Y").Image("C").
If you want QuickTest to identify the virtual object in one occurrence only, select entire parent hierarchy.
QuickTest identifies the virtual object only if it has the exact parent hierarchy.
For example, if the virtual object was defined using Browser("A").Page("B").Image("C"), QuickTest will not recognize it if the hierarchy changes to Browser("X").Page("B").Image("C").Click Next.
7. Specify a name and a collection for the virtual object. Choose from the list of collections or create a new one by entering a new name in the Collection name box.
8. To add the virtual object to the Virtual Object Manager and close the wizard, select No and then click Finish.
To add the virtual object to the Virtual Object Manager and define another virtual object, select Yes and then click Next. The wizard returns to the Map to a Standard Class screen, where you can define the next virtual object.

1 comment:

  1. When we speak of Selenium, we are actually talking about both its flavours: Selenium WebDriver and Selenium IDE. Both automate browsers in support of web application testing. WebDriver is typically used to create browser-based regression tests, whereas Selenium IDE is most advantageous in creating unit tests, exploratory tests and one-off bug reproduction scripts. There is no need to make further distinctions between the two, however, when discussing Selenium’s advantages and disadvantages.
    Selenium Training in Chennai | Selenium Trianing in Velachery

    ReplyDelete