Thursday, October 6, 2011

QTP Tricky Questions And Answers

QTP Tricky Questions
  1. How will you automate a window which while spying is not returning any property value??
  2. How do you find the color and font of all the links on the page???
  3. What are the disadvantages of smart identification??
  4. What are the disadvantages of recovery scenario??
  5. How can you execute JavaScript on QTP??
  6. What are the basic prerequisites required in automating an Infragistics controls based application?
  7. Can I record a web based application on Mozilla??
  8. What is the difference between Repository Parameter and Repositories Collection??
  9. How to copy Virtual Object Manager from one computer to another computer??
  10. Can we use GetRoProperty method to get index or location of link in web application??

QTP Tricky Questions Answers fallows!

Answer 1: In QTP point of view we automation applications where there is proper addin. There are few cases where we can use win32 API and shell programming to achieve.
Example: use win32 query to get the handle or processed of the app and use some API to act on it...this will be a work around not a solution.

Answer 2: use DHTML properties ....use object.attributes...u will get all DHTML properties of that particular element in a collection.

Answer 3: There are many out of which is time consuming it eats lot of time and sometimes, it yields wrong results also in case of dynamic environment.

Answer 4: I think Space and time may be the constraints, because I never used it. It is pretty waste of time to use it.

Answer 5:  To execute JavaScript we have to fallow these steps
  1. Open HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\Configuration_UI\ScriptMgr
  2. Create a new String value with name AltProgID and value "Mercury.JSScriptMgr" and change the value of "Create" to 1
  3. Create a new child key inside the key                             HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\Configuration_UI\ScriptConstants                                                               {0ECD5785-BE7D-11d4-8EAF-11135659EC56}
  4. Repeat the same steps for the below key                           HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\Configuration
  5. Open                                                                                                                                C:\Program Files\Mercury Interactive\QuickTest Professional\bin\QTEditor.ini
  6. Add the below parameter to [General options]                                                             AllowJavaScript = 1                                                                                                 DisableVBScript = 1
  7. Done 
Answer 7: U can record but not as a web application but a standard windows application
Example: Window("Mozilla Firefox").WinObject("MozillaWindowClass").Type "sivakumar"

Answer 8: Repository parameters enable you to specify that certain property values should be parameterized, but leave the actual parameterization to be defined in each test that is associated with the object repository that contains the parameterized test object property values.
Repository parameters are useful when you want to create and run tests on an object that changes dynamically.
Repositories collection is a collection object that enables you to programmatically manage the run-time collection of shared object repository files associated with the current action, for more details check QTP Help file.

Answer 9: checkout for .VOT files in dat folder of the installation

Answer 10: NO

No comments:

Post a Comment