|
|
QTP INTERVIEW QUESITONS
|
301. How To Export QTP Results To An ".xls" File?
Date Posted: 06/27/2012
Ans: By default it creates an "XML" file and displays the results.
|
|
|
302. Syntax For How To Call One Script From Another And Syntax To Call One "Action" In Another?
Date Posted: 06/27/2012
Ans: RunAction ActionName, [IterationMode, IterationRange , Parameters]
Here the actions become reusable on making this call to any Action.
IterationRange String Not always required. Indicates the rows for which action iterations will be performed. Valid only when the IterationMode is rng Iterations. Enter the row range (i.e. "1-7"), or enter rng All to run iterations on all rows.
If the action called by the RunAction statement includes an Exit Action statement, the RunAction statement can return the value of the ExitAction's RetVal argument.
|
|
|
303. How Do U Perform Batch Testing In WR & Is It Possible To Do In QTP, If So Explain?
Date Posted: 06/27/2012
Ans: Batch Testing in WR is nothing but running the whole test set by selecting "Run Test set" from the "Execution Grid". The same is possible with QTP also. If our test cases are automated then by selecting "Run Test set" all the test scripts can be executed. In this process the Scripts get executed one by one by keeping all the remaining scripts in "Waiting" mode.
|
|
|
304. How Can We Insert Statement Option When Adding A Checkpoint During The Recording? How Can We Integr
Date Posted: 06/27/2012
Ans: At its most basic level, integrating QTP with Quality Center enables you to store and access QTP tests and function libraries in a Quality Center project, when QTP is connected to Quality Center.
In addition, your tests and function libraries can use the QC Util object to access and use the full functionality of the Quality Center OTA (Open Test Architecture)—formerly known as Test Director OTA or TDOTA. This enables you to automate integration operations during a run session, such as reporting a defect directly to a Quality Center database.
You can also use the TDOTA object in your QTP automation scripts to access the Quality Center OTA.
|
|
|
305. How Can We Insert A Checkpoint Or Output Value Statement In Expert View Of QTP Manually?
Date Posted: 06/27/2012
Ans: We cannot insert standard checkpoints and other predefined checkpoints or output value statement in Expert View of QTP Manually. But we can insert descriptive checkpoints (Like If… Else) in the expert view of QTP while editing/updating the test scripts.
|
|
|
306. How Does QTP Record On Dynamically Generated URLs And Web Pages?
Date Posted: 06/27/2012
Ans: QTP actually clicks links as they are displayed on the page. Therefore, QTP records how to find a particular object, such as a link on the page, rather than the object itself. For example, if the link to a dynamically generated URL is an image, then QTP records the "IMG" HTML tag, and the name of the image. This enables QTP to find this image in the future and click on it.
|
|
|
307.
Ans:
QTP Professional provides the ability to merge existing assets from two object repositories into a single shared object repository using the Object Repository Merge Tool. This tool enables you to merge two shared object repositories (called the primary object repository and the secondary object repository), into a new third object repository, called the target object repository. Objects in the primary and secondary object repositories are automatically compared and then added to the target object repository according to preconfigurable rules that define how conflicts between objects are resolved.
After the merge process, the Object Repository Merge Tool provides a graphic presentation of the original objects in the primary and secondary object repositories, which remain unchanged, as well as the objects in the merged target object repository. Objects that had conflicts are highlighted. The conflict of each object that you select in the target object repository is described in detail. The Object Repository Merge Tool provides specific options that enable you to keep the suggested resolution for each conflict, or modify each conflict resolution individually, according to your requirements.
The Object Repository Merge Tool also enables you to merge objects from the local object repository of one or more actions into a shared object repository. For example, if QTP learned objects locally in a specific action in your test, you may want to add the objects to the shared object repository, so that they are available to all actions in different tests that use that object repository.
You open the Object Repository Merge Tool by choosing Tools > Object Repository Merge Tool in the Object Repository Manager.
How can we retrieve all objects located inside a Parent Object with QTP?
You can use the ChildObjects method to retrieve all objects located inside a specified parent object, or only those child objects that fit a certain programmatic description. To retrieve this subset of child objects, you first create a description object and add the set of properties and values that you want your child object collection to match using the Description object.
Note: You must use the Description object to create the programmatic description for the ChildObjects description argument. You cannot enter the programmatic description directly into the argument using the property:=value syntax.
Once you have "built" a description in your description object, use the following syntax to retrieve child objects that match the description:
Set MySubSet=TestObject.ChildObjects(MyDescription)
For example, the statements below instruct QTP to select all of the check boxes on the Itinerary Web page:
Set MyDescription = Description.Create()
How Can We Perform Merge Operations Among Various Object Repositories In QTP?
Date Posted: 06/27/2012
Ans:
QTP Professional provides the ability to merge existing assets from two object repositories into a single shared object repository using the Object Repository Merge Tool. This tool enables you to merge two shared object repositories (called...
|
|
|
Ans: You can export all of the objects contained in an action's local object repository to a new shared object repository in the file system or to a Quality Center project (if QTP is connected to Quality Center). This enables you to make the l...
|
|
|
309. How Can We Parameterize A Step In QTP?
Date Posted: 06/27/2012
Ans: Parameterize the method argument of the from Port step:
In the Keyword View, click in the Value cell of the step and then click the parameterization icon. In the Value Configuration Options dialog box, select the Parameter radio button. In the Name box, rename p_item to Location.
Click OK. The Location column is added to the Data Table.
|
|
|
310.
Ans: You can select an object in the application or Web site you are testing and highlight the test object in the object repository.
For example, to locate a Find a Flight image in a Web page, you can select it in your Web page using the pointing hand mechanism. After you select the Find a Flight image object from the selection dialog box and click OK, the parent hierarchy in the object repository tree expands and the Find a Flight image test object is highlighted.
To locate an object in the object repository:
1. Make sure your application or Web site is open to the correct window or page.
2. Click the Locate in Repository button or choose View > Locate in Repository. QTP is hidden, and the pointer changes into a pointing hand.
3. Use the pointing hand to click on the required object in your application or Web site.
Tip: You can hold the left CTRL key to change the window focus or perform operations such as right-clicking or moving the pointer over an object to display a context menu. If the window containing the object you want to click is partially hidden by another window, you can also hold the pointing hand over the partially hidden window for a few seconds until the window comes into the foreground and you can point and click on the object you want. Additionally, if the window containing the object you want to select is minimized, you can display it by holding the left CTRL key, right-clicking the application in the Windows task bar, and choosing Restore from the context menu.
If the location you clicked is associated with more than one object, the Select an Object dialog box opens.
4. Select the object you want to locate in the object repository and click OK. The selected object is highlighted in the object repository.
Tip: If the relevant object repository is not open or the object cannot be found, the object is not highlighted. In the Object Repository Manager, if more than one shared object repository is open, and QTP cannot locate the selected object in the active object repository, you can choose whether to look for the object in all of the currently open object repositories.
How Can We Locate Test Objects In An Object Repository In QTP?
Date Posted: 06/27/2012
Ans: You can select an object in the application or Web site you are testing and highlight the test object in the object repository.
For example, to locate a Find a Flight image in a Web page, you can select it in your Web page using the poin...
|
|
|
|
|