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 will you handle java tree in qtp?

621


how to test Web application using QTP software

1328


How many types of recording facility are available in quicktest professional (qtp)?

599


What is the file extension of the code file and object repository file in QTP?

591


Where should i find checkpoint and virtual objects's Object properties and values in the QTP 9.2 Means where checkpoints or virtual objects related data will store If i want to get the runtime object properties how can i use Getroproperties on Checkpoints

1451






How to connect the remote desktop using QTP 9.2 explain the method or procedure?

2792


What is the difference between the design-time and run-time data tables?

552


what is the diff b/w assistive and mandatary rules of object repository in QTP???

1598


how we connect 1. qtp9.2 to the quality center9.0? 2. Load runner8.0 to the quality center9.0

1476


Can anyone pls tell me how to do action parameterization (input and output parameters) with respect to login window and insert order of flight reservation window in detail( pls give a clear step by step explanation with example) anyone please. Will be very thankful to u

1367


what is the difference btn risks & Therads in the Test plan documentation?

1583


How you create new action in qtp?

556


How to handle dynamic objects in quicktest professional?

494


Tell me one scenario, the complex functionality you have automated in your project?

1471


How can we retrieve the Bug Ids which are open&Reopen in status through QTP scrit?Please find the script which i tried... Dim objBugFactory, objBug Dim BugId Set TDConnection = QCUtil.TDConnection Set objBug = TDConnection.BugFactory If QCUtil.IsConnected then Reporter.ReportEvent 0, "Connected", "Connected to server: " + QCUtil.TDConnection.ServerName + chr (13) +"Project: " + QCUtil.TDConnection.ProjectName + chr (13) + "Domain: " + QCUtil.TDConnection.DomainName Reporter.ReportEvent 0, "Current time on server is","==>" & TDConnection.ServerTime Else Reporter.ReportEvent 1, "Not connected", "Not connected to Quality Center" End If If mybug.Status="Open" Then BugId=mybug.DefectId MsgBox BugId End If 'OR**********************************--------------------- -----********************************** If Bug_Fields("BG_STATUS").Value ="Open" Or "Re Open"Then BugId=Bug_Fields("BG_BUG_ID").Value MsgBox BugId End If

2565