What is InStr()
Answers were Sorted based on User's Feedback
Answer / krishnachand
This is a String Function which uis used to identify where
the position of one string or letter in the other string
which occurs for the first time.
For Eg:
First String str1=: A sentence does not end with because
beacause because is a conjuction.
Second and identified string str2=: because
if we given like a=Instr(str1,str2,1)
it is gives a as 7
| Is This Answer Correct ? | 10 Yes | 9 No |
Answer / mr. buntha khin
Sample code to use InStr() in VB.Net
Friend Function DecimolNumbers(ByVal KeyChar As Char, ByVal
TxtBox As TextBox) As Boolean
Select Case KeyChar.ToString
Case Keys.Delete.ToString
Return False
Exit Function
Case Keys.Left.ToString
Return False
Exit Function
Case Keys.Right.ToString
Return False
Exit Function
Case Keys.Tab.ToString
Return False
Exit Function
Case vbBack
Return False
Exit Function
Case Keys.Enter.ToString
Return False
Exit Function
Case Keys.Home.ToString
Return False
Exit Function
Case Keys.End.ToString
Return False
Exit Function
Case Keys.Escape.ToString
End Select
If (KeyChar.ToString = "." And InStr
(TxtBox.Text, ".") > 0) Then
Return True
Exit Function
End If
If KeyChar.ToString = "." Then Return False
If IsNumeric(KeyChar) = True Then
Return False
Else
Return True
End If
End Function
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / k.chandra sekhar
a) When the use the two are more string then use instr ()
b) Ex: - This like instr (str1, str2, ?)
My name is k.chandra sekhar,
My phone no is 09246540049,
Hyderabad.
My mail id is ndra_143@yahoo.co.in
If any body want full explain send the mail
| Is This Answer Correct ? | 2 Yes | 14 No |
In Remote acess server how u run a test?
datatable.Import("E:\Programming Samples\QTP Samples\OrderNumbers.xls") Asume we have 4 records in datatable Code reads the 4 rows in the sheet ok, but does it 5 times? It doesn't sound like closing the datasheet is the problem Can we close the datasheet runtime ?
Hi all, i have installed QTP8.2 in my system. but script is not generating while recording. What is the problem? is any file missing? pls let me know anybody...Thnaks
How to check which add-ins are associated with a test in qtp?
What is a Run Time Data table?
I want to read XML file loaded in Quality center and compare the values with the values displayed in Application (web table).How can I do that
What is meant by a Check Point in UFT? Also, explain the applicable Check Points.
hai,i want to select an option from the right click pop up menu.but the qtp is not recognizing the right click pop up menu as a seperate object.can any one tell me the solution.
How to start recording using quicktest professional?
examples of user definied functions? how to write user defined functions in qtp9.2?
PLEASE TELL ME WHEN DO YOU USE THE OBJECT SPY AT RUN TIME
Which recording modes need more memory?