Hi Guys, In one of my interviews, I was asked to Write a paragaraph explaining how much scripting I did in QTP? I don't know where to start and what to write. So I need your help in writing that.ThanksDachepally

Showing Answers 1 - 18 of 18 Answers

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

     

KodumuruRamesh

  • Dec 11th, 2006
 

Hi Vasavi

            Your Answer is 100 % perfect for this Question.

kodumururamesh@yahoo.co.in

  Was this answer useful?  Yes

Jenita

  • Dec 12th, 2006
 

vasavi,you mentioned we have to learn the object that sounds like WinRunner i think we don't have to learn the object in QTP.

  Was this answer useful?  Yes

Hi Jenita,

Learning of objects is same in any functional testing tools either WinRunner  or QTP.

While recording the actions on objects  it will automatically learn the objects information.But this is not the appropriate thing when we follow Automation architecture. The first step in any automation Architecture is to learn the objects in your application, then do the remaining....

Jenita,

If u have any doubts regarding this you can feel free to ask me.

Thanks and regards,

Vasavi

  Was this answer useful?  Yes

Kumar L S

  • Dec 13th, 2006
 

Hi...

Scripting is not the recorded lines that appears in the main window of QTP Screen. He means to say "any programming that you have added into your recorded lines".

You can give this example:

You can tell them that you have used some "Condition Statements" to check the records in your database.

IF Condition THEN

Reporter.reportevent "-------"

END IF

Regards..

Kumar L S (kumar_ait@rediffmail.com)

  Was this answer useful?  Yes

Nadem Sharifuddin

  • Dec 19th, 2006
 

1# Scripting in QTP is about working in expert view.

2# Creating User defined Functions using VB Scripts.

3# Using Conditional loops.

4# Manipulating with Functions, Test objects and Utilities.

5# Creating Libraries, creating startup script, creating init script.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions