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

Answer Posted / nahush

txt = "this is jagadeesh"
no_of_space = len(txt)-len(replace(txt," ",""))


MsgBox no_of_space

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to read a text file from QC using QTP. I would like to do something like this. But instead read a file from QC and NOT from my local drive. Set fso = CreateObject("Scripting.FileSystemObject") Set InputFile = fso.OpenTextFile("C:\test.txt", ForReading) Thanks

2759


how to test Web application using QTP software

1333


iam have done mba(finance)in 2008. in 2008 one reputed consultancy came off campus interview our institution. i got job as "manual test engineer". now iam working as "manual testing engineer". now my problem is when iam going interview the interviewer asking like " ur mba gradute how can u get job in test engineer." this question i have faced every interview. iam explaining how iam getting job. but they are not trust me". pls tell me answer how i am giving relavent ans.. this is my mail id y.ramana84@gmail.com

1402


Approach for Installation,comaptibility,system testing

1709


WHAT IS THE DIFFERENCE BETWEEN QTP SCRIPT AND VB SCRIPT? HOW MUCH PERCENTAGE WE USE IN QTP SCRIPT REAL TIME AND HOW MUCH PERCEN OF VB SCRIPT,,,,,,,

1504






A FORM CONTAINS 5 FIELDS. 1 FIELD IS ENABLED REMAINING(4) FIELDS DISABLED. MY QUESTION IS ENTER VALUES INTO 1 FIELD AFTER THAT CLICK TAB BUTTON THEN 2 FIELD ENABLE THIS PROCESS CONTINUE UPTO 5TH FIELD. HOW TO WRITE CODE IN DESCRIPTIVE PROGRAMMING. PLZ TELL ME THE PROCEDURE AND CODE FOR IT.

1283


what is review

1615


When to use shared and local object repository?

636


can any body clearly explain about keyword driven framework .give me the explanation for files what ever you use in this frame work?

1693


How will you compare keyword and expert view?

541


What are the different kinds of test steps?

575


How many types of parameters are there?

547


Discuss the QTP Environment?

631


How to get Traceability matrix from TD?

679


What is throw Object?

1563