Hi,

I am new to QTP and vb.script.How to start to write
vb.script in QTP? Please give me suggestions?

Answers were Sorted based on User's Feedback



Hi, I am new to QTP and vb.script.How to start to write vb.script in QTP? Please give me sugg..

Answer / kondalu

for example: calculator(table as form1) boxes in editbox as
the value1 and value2 and result,buttons as the
add,sub,mul,divide ,clear this in application vbscript
given bellow

vbwindow("form1").Vbedit("value1").set "10"
vbwindow("form1").vbedit("value2").set "20"
vbwindow("form1").vbbutton("add").click
vbwindow("form1").vbbutton("sub").click
vbwindow("form1").vbbutton("mul").click
vbwindow("form1").vbbutton("divide").click

Is This Answer Correct ?    10 Yes 2 No

Hi, I am new to QTP and vb.script.How to start to write vb.script in QTP? Please give me sugg..

Answer / satyanarayana

Hi dear it is very easy to write vb scripting.
First of all we have to understand what the actions to be
performed by us on the application.
Actions means entering a value or clicking a button or
selecting a value from a list dropdown list or selecting or
deselecting a check box.
example for a edit box
Browser("browsername").Page("pagename").Webedit("username").set"satyanarayana"
like the above for buttons .click
for list boxes .select"satyanarayana"
for radio buttons .set
for check boxes .set"on/off"

Is This Answer Correct ?    5 Yes 1 No

Hi, I am new to QTP and vb.script.How to start to write vb.script in QTP? Please give me sugg..

Answer / geena

Do record and play. U will understand how the script
appear. Then try.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.

1 Answers   scintel,


How to write business scripts using object repository with different scenarios

0 Answers  


Count the number of radio buttons and randomly select one.

1 Answers   Deloitte,


What is recovery scenario manager? When you go for recovery scenario manager? Tell me one scenario were your used recovery scenario in your project?

0 Answers  


Explain advantages and disadvantages kdf?

0 Answers  


I have two For loop, first For loop does is creates a customer and input the customer info and then the second for loop within the first for loop does the follows which is capture the customer name and verify the with the data within the datatable. The problem I am coming across is that when it goes through the second time creating another customer and then verify the second customer then it creates the following during runtime. I want is to have the customer2 below Customer1 under the Customer_from_Apps. Any help will be greatly appreciate it. Customer Customer_from_Apps Customer_from_Apps1 Customer1 Customer 1 Customer2 Customer2 Window("Customer Desktop").Window("Customer Tracking (Privacy").WinObject("TreeView20WndClass").Click 92,244 runtimevalue = .VbTreeView("vbname:=AppServerTree").GetROProperty("Selectio n") Customer_Val= Datatable.GlobalSheet.AddParameter ("Customer_from_Apps",runtimevalue) row=datatable.getsheet("Global").GetRowCount For x=1 to row datatable.SetCurrentRow(x) Data_Val=Datatable.Value("Customer",dtGlobalSheet) If (trim(Customer_Val)=trim(Data_Val)) Then Reporter.ReportEvent micPass, "Customer validation successful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val else Reporter.ReportEvent micFail, "Cusotmer validation unsuccessful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val End If Next

0 Answers  


what is defenetion of kiran can u tell me plz CVS, SVN

0 Answers  


how will check the links in multiple pages at a time

3 Answers  


I am having trouble understanding #1 how to paramaterize a userid and password that I need to call in about 25 existing scripts. I need to know how to Create a Reuseable action for 25 existing scripts that will call the exact same userid and password? I need to know how to create a Reuseable action and then have it called by existing scripts being run in a batch.

2 Answers  


What’s the basic concept of QTP?

1 Answers  


How to map the test cases to requirements in QC?

4 Answers   IBM,


Hi Friendss..., can any body help me.. 1. Tell me your achievements(Technically)..? 2. Tell me your strengths(Technically) and weakness(Technical)..? 3. Why are you looking for change..?

0 Answers   Ness Technologies,


Categories