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 |
Explain the concept of object repository and how quicktest professional recognises objects?
How to apporach while starting the automation testing?
can u store QTp frame work folders in VSS? If Not where u store those?
what is the Command used to start the QTp from Run.
how to post xml data from QTP scripts to any application?
What is Automation frame work.How we will prepare in real time.
Login to flight app, in window flight reservation set the date field and select flyfrom as Frankfurt and verify whether flyto list box has the item FrankFurt, log the results.
How many types of parameters are there?
Up to how much VB scripting knowledge and what type of VB script knowledge is required for a QTP test engineer for real time to work ?
give me the code to save all messages of inbox of gmail into a folder and notepad
Key word driven framework
What is the difference between the design-time and run-time data tables?