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 i change the runtime properties of an object ? How can i check if a parameter exists in database ?
I am a newbie to QTP / Automation testing. I want to develop a script that creates a data file automatically with proper headings using VBScript in QTP.
Thanks....But can u tell me how i use the QTP for GIS with one Example...
How can i click on any Excel sheet's "H" column with out writing coordinates Ex:Window("Book1").WinObject("Book1").Click 498,14 I dont want to give coordinates like 498,14 Can i open "H" column by writing like Ex:Window("Book1").WinObject("Book1").Click "H" or Ex:Window("Book1").WinObject("Book1").Click "H","1" or Ex:Window("Book1").WinObject("Book1").Click H,1 If i want to click on "Sheet3" of an excel sheet, Can i open like Ex:Window("Book1").WinObject("Book1").Click "Sheet3" Please help me any one
Can any one say what exact diff between test->parameters, action properties-> parameters. after defining the parameters in test->settings, how can we access those parameters.(i know how to use action prop parameters)
Can we create user defined functions in qtp?
Hi, I am supposed to automate mainframe application through qtp. I do not know how to start abt it. Can you plz help me in first initializing the process or do you anybody have a guide book or a link which guides me through the process of automating the mainframe applications and things involved in it.
What are the features supported by UFT?
.have you ever written compiled module? if yes , tell me about some of the function that you wrote.
How many lines of code in each script of QTP?
What is quick test pro?
how to test use the quality control .how to verify the image verification
How QA specialist can identify when programmatic descriptions are useful?
What does mean by Scope of Automation?n How we defined it?
How to recognise the webelement and verifying that webelement is enabled?