how to get the particular chr in an array list the question
is ....i have an array like this
ABCD
EBCF
GBCH
IBCJ
HERE I NET TO GET ONLY "BC" FROM ALL HOW TO GET IT
HELP ME ANY ONE
THANKS
Answers were Sorted based on User's Feedback
Answer / gabbar
a="ABCD EBCF GBCH IBCJ"
b=Split(a," ")
For i=LBound(b) to UBound(b)
msgbox "count: "&i&" "& mid(b(i),2,2)
Next
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / koteswar
str = " ABCD EBCF GBCH IBCJ HERE I NET"
n = split(str, "BC")
cnt = ubound (n)
msgbox cnt
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / snegha
ar2=Array("ABCD","EBCF","GBCH","IBCJ")
arlen=UBound(ar2)-lbound(ar2)+1 'Finding array length
For p= 0 to arlen-1
msgbox Mid(ar2(p),2,3)
Next
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / dinesh1433
Dim AR2,i
AR2=Array("ABCD","EBCF","GBCH","IBCJ")
For i=0 to ubound(AR2)
If (Instr(AR2(i),"BC")<>0) Then
msgbox "BC found in Element :"&AR2(i)
End If
Next
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / rajesh
hai.. Koteswar
i need to say thanks for your quick reply ..
but my question is how to get BC IN A ARRAY means i need to
display it.....,BUT YOU ANS THAT HOW MANY BC ARE THERE IN
THE ARRAY LIST .....IF POSSIBLE PLEASE GIVE A COMMANDS AGAIN...
Is This Answer Correct ? | 0 Yes | 0 No |
This will print BC 4 times.
a="ABCD EBCF GBCH IBCJ"
b=Split(a," ")
For i=0 to ubound(b)
msgbox mid(b(i),2,2)
Next
Is This Answer Correct ? | 0 Yes | 0 No |
Does QTP support flat files? If yes what are those?
How to call Datable values in the QTP program. exp: I have two parameters like Email id and Password this two i would like to add multiple entries in the datable to use it. What is the difference between Gobal/Action datatable
when you press a link it displays "the page cannot be displayed" then as a tester how you will find the problem,what type of problem must be it?
HOW TO COUNT NUMBER OF ITEMS PRESENT IN WEB LIST
What is the difference between client server application and web based application?
Where u will use output checkpoint in QTP?
Hi I have a doubt in qtp. Can you please clarify my doubt. If we are importing the data from excel sheet in qtp the the script is running the number of row times. I mean if there are 4 rows in excel sheet the script is running 4 times. cant we avoid this. suppose i have tis script: datatable.Import "C:\Documents and Settings\sailaja\My Documents\login1.xls" n = datatable.GetRowCount For i =1 to n systemutil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe" datatable.SetCurrentRow i Dialog("Login").WinEdit("Agent Name:").Set DataTable ("Username", dtGlobalSheet) Dialog("Login").WinEdit("Password:").Set DataTable ("Password", dtGlobalSheet) Dialog("Login").WinButton("OK").Click Window("Flight Reservation").ActiveX ("MaskEdBox").Type "020209" Window("Flight Reservation").WinComboBox("Fly From:").Select "Frankfurt" Window("Flight Reservation").WinComboBox("Fly To:").Select "Los Angeles" Window("Flight Reservation").WinButton("FLIGHT").Click Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click Window("Flight Reservation").WinEdit("Name:").Set "Sailaja" Window("Flight Reservation").WinButton("Insert Order").Click Window("Flight Reservation").WinMenu ("Menu").Select "File;New Order" window("Flight Reservation").Close next I created a excel sheet with 3 rows and 2 columns. (username and password). The script is running 9 times. I made the option run one itaration only . eventhough it is running 9 times .can u plaese clarify my doubt. Thankyou Sailaja.
hi can any body give me a script for creating a modularity or keyword driven framework..i am working as a qtp tester for 2 months but still i am not exposed to framework in my company
Where you are storing your script?
is qtp 9.2 create the scripts with the application run on mozilla firefox browser?
Can the mode of object repository be change during run time? Eg. if the mode is per-action during design time can i change it to shared and vice-versa? Any scripting possible?
For ex we are doing automate testing in that can we do some part of application recording, some part descriptive programing and some part general VB scripting like that .............