1. How to make arguments optional in a function?
this is not possible as default VBS doesn't support this. Instead you can pass a blank scring and have a default value if arguments r not required.
2. How to verify the Cursor focus of a certain field?
Use "focus" property of "GetRoProperty" method"
3. Any limitation to XML Checkpoints?
Mercury has determined that 1.4MB is the maximum size of a XML file that QTP 6.5 can handle
4. How to add a runtime parameter to a datasheet?
DataTable.LocalSheet
The following example uses the LocalSheet property to return the local sheet of the run-time Data Table in order to add a parameter (column) to it.
MyParam=DataTable.LocalSheet.AddParameter("Time", "5:45")
5. How to retrieve the property of an object?
using "GetRoProperty".
6. How to open any application during Scripting?
SystemUtil , object used to open and close applications and processes during a run session.
(a) A SystemUtil.Run statement is automatically added to your test when you run an application from the Start menu or the Run dialog box while recording a test
E.g : SystemUtil.Run "Notepad.exe" SystemUtil.CloseDescendentProcesses ( Closes all the processes opened by QTP )
7. How to covert a String to an integer?
CInt()---> a conversion function available.
8. Explain the terms TEST and Business Component?
Test-A collection of steps organized into one or more actions, which are used to verify that your application performs as expected. By default each test begins with a single action. Business Component-A collection of steps representing a single task in your application. Business components (also known as components) are combined into specific scenarios to build business process tests in Mercury Quality Center with Business Process Testing. A component does not contain actions, you add steps directly to a componenet.
9. What do you mean by iteration?
Each run session that uses a different set of parameterized data is called an iteration.
10. What are the views available in QuickTest Professional (QTP)?
(1) Keyword View
(2) Expert View