Hi,
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
partial
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?

Thanks
Uma



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
Next
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

How many function you use in your application?

2 Answers   Polaris,


How to record a qtp script ?

0 Answers  


During execution, how can we capture the data from the pop- up, ie. when any popup comes with some numbers written on it, then how can we capture the value/number that is coming on the pop-up and save in the dynamic file/or other file, even when the run is going on.

2 Answers   Wipro,


Explain different type of event trigger option.

0 Answers  


What is chaild object method? When we will go for chaild object method? How to use chaild object method?

2 Answers  






What are the different types of recording modes in qtp? Which will be used when?

0 Answers  


1. I have asked the same question for the third time, but i am getting wrong answers. Pls give me the script to count the number of edit boxes or checkboxes in an windows application screen. In windows application childobject is not working, anyone very urgent

8 Answers  


I have many listboxes in my application. I have to check whether the contents inside the listboxes are in sorted order or not..can anyone please send the code as early as possible

0 Answers  


Explain QTP using different development techniques ?

0 Answers  


How can get count of list box?

0 Answers  


Hi experts. I want to create a framework for the Flight Reservation sample application.Can anybody tell me the files and the contents , and how to create them.Thanks

2 Answers   IBM,


4. what is the use of Text output value in Qtp?

1 Answers   Wipro,


Categories