i have an array CAPGEMINI .....Here i need to check whether
G is there or not ..how to do that
and friends i have one big doubt that is
whether it is array or string ,how we come to know that and
where we consider that it's array ,where we consider that
it's an string
because when i want to find the length i have big doubt
whether we need to use len function or ubound ...
ans me for this TWO Questions any one please

Answer Posted / koteswar

str = "CAPGEMINI"
z= "G "
flag = 0
For i = 1 to len(str)
x = mid(str, i, 1)
If Instr(1,z,x,1) Then
msgbox z
If flag = 0 Then
Reporter.ReportEvent micPass, "The required Letter is
available in the stirng", "True"
else
Reporter.ReportEvent micFail , " The required Letter is
not availabe in the string" , "False"
End If
End IF
Next

Array means It is a collection of similar objects and
enclosed with curly braces. at that time you can use Ubound
for count the no of objects are available in the given array

Srring means single or collection alphanumeric characters
enclosed with quotations. If you want to count the no of
characters in the given string you can use len()

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which functionalities of QTP used in banking project? pls any say answer?

1449


How to check feasibility of the appliction?in automation testing?

1474


hi frinds i need help .i have 4 + yrs exp in testing and nearly 2 yrs exp in QTP and QC .currently iam working north fast 2 yrs iam looking for job in south is there any openings plz letme know my mail id is pbre1980@gmail.com

1574


Hi,Sudhanandareddy plz forword framework and ppts for QTP to me. This is my mail id: ranjith_99reddy@yahoo.co.in (your contact number also)

1743


After executing the script in qtp suppose i found some script execute successfully and found some error.So how to report the status for both (i.e pass and fail report)in test director. For "fail" We use "defect tab" in testdirector. But for "pass" how to report it to TL.what is the process plz anybody ans

1681






What is the use of defining a newobject in the object repository "Define New TestOject". How to use this further. If we define new testobject, how can it recognizes the objects properties of any application.

1508


I am having major problems with some DB Table Checkpoints I add to my script. I 35 web based applications recorded and each has DB Table Checkpoints insert but only 1 script isn't recognizing the DB Table Checkpoints for some reason. I've checked the DB connections and the info in the Library Functions and still only this one script out of 35 doesn't recognize the DB Table Checkpoints. Can someone please help me figure out why only this one script out of 35 that's hitting the same database is having a problem.

1747


How do we analyze the checkpoint results?

588


What is the difference between the design-time and run-time data tables?

563


I am a new tester that needs to create an automatic script involving security questions. On a webpage I need to select a security question(which are random) from a drop down menu, and then input the answer as the last word from the security question. I have the script set-up to automatically select the first security question from the drop down. The problem I am having is trying to insert the security answer. How do I insert the security answer based on the selection from the security question?

1855


What are the views available in quicktest professional (qtp)?

579


I want two test two agents login for the flight website. Here is the scenario: I want to go through 1-3 rows for one user login and other user login I want to go though 3-5 rows. How would you set this up in qtp. Thank You

1525


How many ways we can parameterize data in quicktest professional?

565


what r the main attributes of test automation?

1482


I recorded a Web App with a Oracle backend using QTP 9.5 and for some reason the scripts don't play back> What am I missing at this point. I recorded the same Apps under Sybase and they work great. This is Oracle 10g. Why won't my scripts play back.

1517