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 / sisira
str1="1,1,2,2,3,3,4,2"
l=len(str1)
for i=1 to l
if mid(str1,i,"1")="1" then
count1=count1+1
elseif mid(str1,i,"1")="2" then
count2=count2+1
end if
next
msgbox count1
msgbox count2
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Can any suggest me what is exposure testing?
I need Major Help with a Script I recorded in QTP 9.5. I am recording scripts for a Web-based application(s) I have all the URLs for each application in Excel spreadhsheet so that QTP can pull that particular application from the spreadsheet and run it. The problem is QTP isn't recognizing one particular URL so when I hit run in QTP to run this script it opens the internet Explorer but isn't open the URL I have in the Excel spreadsheet. I've retyped the URL and still QTP won't open this Particular one for some reason. The site its self is working fine but for whatever reason QTP won't open it. How do I resolve this? I have a deadline of next Friday the 7th to complete this task so please help me in any way you can. Thanks in advance
Hi, I am working on microsoft infopath forms..It is standalone form..(not dotnet or web.) . I am not able to indentify any objects in it.. I am currently using active accessibility in the macro for the same but its execution is too slow.. Kindly help in case you have better solution.
How you know that a test case is a regression test case
Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..
Does Low-level recording capture mouse movements?
How to use the object spy in quicktest professional 8.0 version?
i have asked earlier only one question how to test web application using QTp plz send me the answer quickly
Is it possible to change the property value at runtime? How it is possible?
Hi I am new to QTP. can u please answer to my qus... suppose 3 excel sheets are there * we are trying to check for login credentials for a page. userid from excel1 , password is from excel2 whether the page is opened or not that checkpoint is result is should be stored in excel 3.... this qus i have faced in IBM technical round... please tell script for above query ... please please
hou can we use vb script in qtp could u tell me breafly
hi guys, pls tell me for testing institution training hub, hitech city is best or not?
How do you create new test sets in td?
There is an built in window application in qtp9.1,i.e.Flight4.0.i want to implement the recovery maneger on it.How can i do this?
If I change the object name in one action will it be updated in all the actions? Or not?