Hi,can anyone tell me How to found the number of 1's and 2's in the given format 1,1,2,2,3,3,4,2 using vbscript
Thanks in advance
Answer Posted / hariharasudhan s
str1="1,1,2,2,3,3,4,2"
A = Split(str1,",")
For i = 0 to ubound(A)
IF A(i) = "1" then
Count1 = Count1 + 1
Elseif A(i) = "2" then
Count2 = Count2 + 1
End if
Next
Msgbox Count1
Msgbox Count2
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
When QTP object wait time is 10 seconds, and in test script wait time is 5 seconds and in function library wait time is 2 seconds how much time does the wait occur? or which is given priority.
Name the different types of recording modes?
How to do the scripting. Are there any inbuilt functions in QTP? What is the difference between them? How to handle script issues?
whare exactly we have to use functions and sub routain
Can we record an application running on a remote machine using qtp?
please post the interview questions for QA position in FACTSET
Can we call qtp test from another test using scripting. Suppose there are 4 tests and I want to call these tests in a main script. Is this possible in qtp?
How to analyzing test results using quicktest professional?
Hi Samrat, Thank u very much, what u said it is right.
Could you please any one give code for the following ? Scenario : Suppose a excel file contains 10 records and earch have 5 fields. how can i input this excel file for datadrive wizard ? Please explain
write a script to verify links on any web page by using descriptive method by creating a description object (give a filter condition only link) ... need to verify expected like name by reading
can u explain the keyword driven framework with an example clearly how to create all the files and how to attach to main test.
Print the Prime numbers in below format only up to 20(Need commas also) 1,2,3,5,7,9,11,13,17,19
What is the quicktest professional (qtp) testing process?
is it possible to add sheets to excel at runtime