how to count spaces in a given string ex: "this is jagadeesh"
in QTP with simple functional script

Answer Posted / jaag@jagadeesh

dim str
str="this is jagadeesh
var=UBound(split(str," ")))
msgbox var

ans
2

Is This Answer Correct ?    19 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

QTP script is not working on other's machine..

1531


Hi Guys, I want to place all of my values which i am getting it from a loop in to a global shee. For that i had written the script like this For i = 1 to ECOs-1 ECO = List(i).GetROProperty("innertext") DataTable.AddSheet("ECOList") DataTable.GetSheet("ECOList").AddParameter "ECOList",ECO AbortECO = DataTable.GetSheet("ECOList").GetParameter ("ECOList").Value msgbox AbortECO DataTable.GetSheet("ECOList").SetNextRow Using the above script, whenever the loop iterates it is creating new column "ECOLIST" in the sheet called "ECOLIST". It means, the values are displaying in the column wise even though i added the script " DataTable.GetSheet("ECOList").SetNextRow" . The cursor is not moving to the next line. Anybody help me out how to pass the values from script to the excel(Global/Local) sheet. Pls let me know @ nbabu11@gmail.com if you are not clear about the question.

1380


How to find Operating system information using QTP script?

565


Explain the use of action split in qtp?

554


How to use the object spy in quicktest professional 8.0 version?

538






How to start recording using quicktest professional (qtp)?

591


banking project description for software tester

7016


Plz Explain How to access Or Store Script from VSS? Explain Real time work (qtp) where you store folders and next to how to you access that folders and how you maintain folders in VSS ? What are the Menu's in VSS? Suppose in Manual, by using Checkin Checkout u can access documents. how you access in QTp REal time?

1570


Hi, Can anyone please tell me how to connect the QC with QTP using QTP script? Thanks in advance

1515


What is environment variable in qtp and why to use it?

541


How do I get the QTP scripts result in xml format by using vb script function?

1776


What are the two types of repositories available, explain them?

586


How to replay a script in qtp?

610


hi all here i have tab named "Workbench" By clicking on "workbench" tab.it displays 4 tabs like below workbench common cargo commercial charter "common" tab have 10tabs inside,"cargo" tab also haveing 15 tabs inside and remaining two tabs also having few tabs inside. when clicked on "common" tab.it displaying the script like tab("workbench").select"common" if i clicked on "cargo".it displaying the script like tab"workbench_2").select"cargo" if i clicked on "commercial".it displaying the script like tab"workbench_3").select"commercial" if i clicked on "charter".it displaying the script like tab"workbench_4").select"charter" I have used a "FOR LOOP" for common,commercial,cargo,charter tabs.it was stopped at second tab SO, CAN I RECOGNIZE "WORKBENCH_2,_3,_4" AS A SINGLE VARIABLE if not, can anyone plese help me to solve this

1508


Can anyone help.i need total excelsheet operations,shortcuts in testing environment from starting onwards....

1420