abt filter function
if iam using below two statments its ok
My = Array ("Apples","Oranges", "Apricots")
MyResult = Filter(My, "Oran")
if i use msgbox MyResult
it shows type mismatch
plz help me
Answers were Sorted based on User's Feedback
Answer / lakshmi
Boss,
Filter function will a zero-based 1-D array. so we have to
use subscript.Filter function may return more than one
matches. then u have to take a loop (for or while) and u
have repeat this loop until ubound of that array.So in u r
case, please see the answer below:
My = Array ("Apples","Oranges", "Apricots")
MyResult = Filter(My, "Oran")
Msgbox MyResult(0)
Here i was mentioed subscript as 0 as we have only one item
which matcehs with u r search.
If there is more than one match, then u have to do likt
this.
My = Array ("Apples","Oranges", "Apricots")
MyResult = Filter(My, "Oran")
For i=0 ubound(MyResult)-1
Msgbox MyResult(i)
Next.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / reddy prasad
Hi
thanks lakshmi
regards
reddy prasad
raju16prasad@gmail.com
| Is This Answer Correct ? | 0 Yes | 0 No |
How to see the screens after running test in QTP?
what are all the fileds present in object repository?
what happen in object repository(shared)if we call an existing action from an external action ? and what happen in object repository(peraction)if we call an existing action from an external action ?
When using descriptive programming?
What is qtp window?
On what document base Descriptive programming is written if build is not yet ready ?
Can you give me the code to calculate the total number of Links using the child object in the web page..? is there any other way to calculate number of links with out using the Child objects.??
2 Answers DST Global Solutions,
Hi Frriends... I have one Query please give the apropriate ans. when we r working with web based application , the user loggedin page name is changed respect to the username ( Take a exp. Yahoomail.com) .When we use Datadriven test to this scenario ,each time the loggedin page name is changed ...then the script is fail.. at that time wat can do... please give the apropriate ans. Thanx in advance..
IN A WEB PAGE THERE IS TWO WEB BUTTON WITH SAME OBJECT PROPERTY AND VALUE, SO HOW I WILL IDENTIFIE OBJECTS INDIVISUALY.
What is qtpro? What is quick test pro? What is a quick test professional?
How to handle Run-time errors?
What is a Dictionary object in QTP.?