Hello,

I have an array e.g. Array = "A,B,C,D,E,F,G,H,I,J"
I have a web application . In that I have an edit box . This box will
lead me to create a unique profile. the edit box will only accept
alphabet and It will accept only one unique value from that array
which has not been used by any  profile. e.g. A and B has been already
used. So i can only use C. So any body can provide me the code to
check the first value and if it has been used then it will take the
second value from array and then check the third value. if third value
satisfies the condition then it will not check the remaining values
stored in the array.

if have written a code like below.

Dim strArray
strArray = "A,B,C,D,E,F,G,H,I,J"
strtArray = Split(strArray, ",")

*****I am using it to check the condition that the number is unique
other wise it throws an error .So I am using that error as condition.
it I enter the value and if it doesnt give any error then it will not
check the remaining item in array*******
Dim SrtItem
For Each SrtItem in StrArray
if Browser("").page("").frame("").webelement("").exist then
Browser("").page("").frame("").webelement("").Set(SrtItem)
End If Next.

The problem in this code is that when the error web element doest not
exist it keeps on running the loop till the last item in the array.The
system has to wait a lot. I want the system to exit the loop if a
condition is met.

Any suggestion to to the problem and use a better method will be
helpful.


Thanks in advance
Raj


-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to