Hi Dachepally
I think in order to test your skills in QTP they must have asked like that.You must have taken one screen in your project and must have written Script for that.For Example i think you are familiar with Login page which has the username and password textfields with Login Button.
Step1:
Open QTP and load the Webaddins and VB addins if required.
In New test First Learn the Objects Username textfield Password textfield Login button of that Login page using Add object Concept in Object Repository and adds the objects information to the ObjectRepository.
Step2:Go to Expert view and then start writing the Script as
Browser( Login ).Page( Login ).WebEdit( username ).Set username --- 1
1--- this script enters the data username into the username field by placing the cursor to the username field which is in the page Login of Browser Login
Browser( Login ).Page( Login ).WebEdit( username ).SetSecure password -2
2--- this script enters the data password in secure format in the password field by placing the cursor to the password field which is in the page Login of Browser Login .
Browser( Login ).Page( Login ).WebButton( Login ).Click
---this script clicks on the Login button by placing the cursor on the Login button which is in the page Login of Browser Login.
This is how you need to explain the script what you have written.
Regards
Vasavi