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
Answer Posted / 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 View All Answers
What are private functions in QTP? How they can be called from the function library?
What is the purpose of loading qtp add-ins?
i am trying to automate yatra.com,in that site, when i go to automate the Leaving from field showing as a WEBEDIT, but when i enter 1 or 2 char, it displaying dropdownlist, i try to use keyboard automation to select the item from that list but it is not possible, can anybody help he. Thans for posting the Answer
How can you pass value one action to another action?
The hybrid framework can be implemented for any application. Is it true?
how to find that tools work well with your existing system?
How do you handle multiple banners(at the top the page, the banner is scrolling) in a web page(Dont take the name property(regular expression))
If you are testing a web application then what will you test in that application?
write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object..
How many types of parameters are available in quicktest professional (qtp)?
What is the difference between Keyword Driven test and Data Driven test?
RECENTLY I PLACED IN QTP..HOW TO IMPROVE VB SCRIPTS KNOWLEDGE? IAM STRUGGING TO WRITE THE AUTOMATION SCRIPTS? ANY BODY TELL HOW TO IMPROVE QTP SCRIPT SKILLS?
What are the benefits of qtp?
How you debug your script?
I used child objects to get the no of weblist present in the weblist.now i need to select the items present in each weblist ?How to do so