I am using OutputCheckPoint for 2 webelements Bed:4 and
Bath:2 Full,1 partial in my result page and I am storing
the value in the data table.

I dont need the string Bed:4,I would like to get only the
no 4.
How can I get it?
Even though I highlight only 4,It is seleting the full
value "bed 4".

Same thing happend for second webelement Bath:2 Full,1
I need only the No 2.

I used the following to split
MyArray = Split(UIBathResult, " ", -1, 1)
But it is giving the value
My Array(0)=Bath:2full,1Partial

I need the only the nos for further comparision.Any help?


Hi, I am using OutputCheckPoint for 2 webelements Bed:4 and Bath:2 Full,1 partial in my result pa..

Answer / nath. t

Function returnNumber(str)
For i = 1 To Len(str)
num = Mid(str, i, 1)
If IsNumeric(num) Then
returnNumber = num
Exit Function
End If
End Function

str1 = "Bed:4"
str2 = "Bath:2full, 1Partial"
str3 = "1Partial"
x = returnNumber(str2) 'You can send any string it will
find and return the first number in the String.
MsgBox x

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

If you are using descriptive programming and you have two objects with the same name, so you are identiying them by name and index, how can you avoid errors if a third object with the same name is added at the begining of the page?

4 Answers  

how to load all resource files(function libraries,object repositories etc) into tests without associating them?

1 Answers  

How to customize checkpoints with parameters?

0 Answers  

HOW to invoke any recorded script in QTP with out using RECORD & PLAYBACK CONCEPT?

3 Answers   CTS,

what is the extension for the test version of the script?

5 Answers   TCS,

How to find local host name using QTP?

6 Answers  

Hello Guys, Can anybody Explain me about Automation framework?? and how can we prepareAutomation Framework using QTP

3 Answers   IBM, CTS, Sapient,

what is descriptive programming?

5 Answers   Ordain Solutions,

• What type of testing questions will be asked for 2+ yrs exp people in interview?

0 Answers  

How QTP recognizes Objects in AUT?

1 Answers   Crea,

Which method do you use to retrieve data from the WebList object?

1 Answers  

what is descriptive.create()in qtp?

3 Answers