how to calculate no. of repeating characters in a a
string..please give me the code
Answer Posted / kajal
Function RepeatCharCountInString
RepStr = "Automation Using Test Complete"
Msgbox(RepStr)
RepStr = Replace(RepStr," ","")
RepStr = LCase(RepStr)
RepStr1 = RepStr
For i=1 to Len(RepStr)
RepStrChar = mid(RepStr1,i,1)
Count=0
For j=1 to Len(RepStr1)
Char = mid(RepStr1,j,1)
If(Char=RepStrChar) Then
Count = Count +1
End If
Next
If (Count = 0) Then
Exit For
End If
Msgbox(RepStrChar &" Count is " & Count)
RepStr1 = Replace(RepStr1,RepStrChar,"")
RepStr1 = RepStrChar+ RepStr1
Next
End Function
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Could anyone help me for the below scenario: i am using the descriptive programming for my account, in which we have to generate the contract in the MS-word. when i generate this doc, we need to click on enable macros to continue further. but i am unable to make qtp to click on this. if anybody faced the problem like this??? pls help to get it resolved? Thanks in advance
How many types of trigger events are there in qtp?
Whether qtp 9.0 supports Test director8.0
how to use the QTP choose the data from oracle? e.g. i input the identity card NO. this will be add new record in the database ,and now i want get this record's prime key.
How many tabs are available to view your test in a test pane and what are they?
What are the challenges you faced during you entire life automation ?
what is meant by source control?
hi i have completed my b.tech in cse stream. now i am working in an organisation in testing department. i want do sap course but i dnt know which module will boost my career can anyone suggest me which is good for my career
Differences between text and test area checkpoints?
how we connect 1. qtp9.2 to the quality center9.0? 2. Load runner8.0 to the quality center9.0
in a web page hoe to check the dynamic links that rechabging with out using regular expressions
What is Unicode Compatibility?
How to handle the exceptions using the recovery scenario manager in qtp?
How to sendKeys in QTP? Diff b/w sendkeys and device replay? Diff b/w function and Sub? Diff b/w Array and List Different Types of running Keys other than Fast, slow,Normal mode Regular expression for http://newtours.demoaut.com Difference between \w and \W How to generate script button Recording Types Different Types of Actions? Using DP performance degrades, If Yes why? How to close all the opened browsers? Diff b/w SystemUtil.Run and invoke application? If qtp not recognized the combo box How to select values from drop down?
Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks