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

Explain how qtp identifies object?

0 Answers  


What are the types of environment variables in qtp?

0 Answers  


QTP 1.What type of bugs u commonly find in u r project? 2.what is agile testing explain with example? 3.application is given req n functionality r missing then how can u start testing? 4.what r the types of defect tracking tools? 5.what is functionality testing? 6.what is change req how u use it? 7.diff bet gul n functional testing? 8.test cases for IE 6.0? 9.where do u store test cases? 10.what r design objects in qtp? 11.what r 5 types of objects in qtp? 12.how to change .mtr to .tsr n vice versa? 13.in which situations qtp will not recoznize objects? 14.how to call .vbs fuctions, library files in qtp? 15.if 10 windows r ope write command to close all windows in qtp? 16from what stage u start automation in u r project? 17.what is VSS? it is usedin automationr manual? 18.size of object repository? 19.how to conduct GUI testing n performance testing on MS-Word? what r performance TEST CASES? 20. use of virtual objects explain? 21.how to connect buzilla with qtp? 22. what is API ? 23.how to merge 2 object repositories in qtp? 24.what is recovery scenario manager? 25. diff bet link n hyper link? 26.diff bet test case n test case scenario? 27.what is relational testing? 28.where do we write test cases? 29.what is base line in testing? 30.what r key process areas(KPA) in u r company? 31.what is hot fix? 32.what is sql injection? 33.what is valnerability? 34.what is TOM in qtp? 35.can we do qtp testing with out creating objects in object repository? can we completely write code in expert view only? 36.where we cant do automation testig? give example using OR is a advantage r a disadvantage?

6 Answers   IBM,


How to capture data from images in QTP and produce them in Excel sheet ? please ans...

3 Answers   Sapient,


Does QTP support Java Script also. Which is one is preferrable for QTP, VB script or Java script

18 Answers   IBM,






How to parameterize Object Repository?

2 Answers  


Where you get the run time data table?

0 Answers  


HOW CAN QTP AND TEST DIRECTOR CONNECTED TO THE DATABASE AND WHAT R THE OPTIONS?

0 Answers  


How can i find out any "text's" coordinates in excel sheet For example: I want to know the coordinates of "F" Column in the excell sheet While recording when i clicked on F column it is showing the coordinate values 385,9 but with out recording how can i find out them Suppose i want to clik on "H" column writing the script like this Window("Book1").WinObject("Book1").Click (...........) Here I Dont know what (x y )values should i enter Please any one can help me?

1 Answers   Livetek,


Explain data driven framework?

0 Answers  


How to connect to a database?

0 Answers  


how to associate object repository during runtime in qtp

1 Answers   Deloitte,


Categories