Friday, May 1, 2015

Some Questions and Answers that very frequently ask in Interview

Q1. In UFT how you can prevent the system from getting locked?
 Ans. To prevent system getting locked, any of the two ways can be used
  • Create a simple vbs file having code to press numlock key and run that vbs file
  • Edit one registry key “DisableLockWorkstation =1” to disable locking

    Q2. How we can find out the Total execution time of the test case?
    Ans. We can use the below code

    Teststart =now()

    'Test steps

    Testend =now()
    TotalTime =datediff("n",Teststart,Testend)
    Print TotalTime

    Q3. How we encrypt any value in QTP for security purpose
    Ans.

    pwd= "Password"
    pwd = Crypt.Encrypt (pwd)
    print pwd

    Q4.What Coding standards we have to follow during writing any function
    Ans.
    1. Variable Naming Convention
    2. Function name should be related to Function
    3. Since we are automating manual test case to QTP scripts, So scripts should be Manual Test scripts name in QTP
    4.Each Action, Function, Scripts should have
    Created Date
    Created By
    Purpose
    Modified

    Q5. What is the difference between the Systemutil.Run and InvokeApplication?
    Ans.  Systemutil.Run method can open any kind of application but Invoke application method is used for only exe file.

      No comments:

      Post a Comment