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 |
When Recovery scenario actually starts while testing the application?
In a page i have N number of links at a time i would like to open those links by using QTP?how to do that?
You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?
Plz write the code, function will take the parameter as month number, i.e., numerical value, but it returns the last day of the month in string (weekday). example: input: function parameter: 3(march) output: thursday
why can't you use excel directly in qtp. why we want to import excel data into Datatable.
write vbscript in qtp tool for senario, in the given sheet add each number in each row and each colunm and show result
While writing script using For Next Statement in QTP, I try defining the variable in Lib File I am getting syntax error whereas if I use the variable in script file, the script works fine. Can anyone help me in finding the reason behind this?. E:g Dim intStartRow (Define in Lib File----- say abc.vbs) Dim intRow (If I define this variable in Lib file I am getting Syntax error where as if I define in the script file ---- say xyz.mts the script works fine) IntStartRow=2 For intRow = intStartRow to xlWrksht.UsedRange.Rows.Count ‘Some Code here Next
explian qtp frame work and what is the use of it? what is the neceecity of this? explian detail?
what is framework in QTP? any one give me answer
What are the types of environment variables in qtp?
Could some one help me the difference between GetTOProperty and SetTOProperty and when we will use these properties. and what is meant by SetToProperties..
Explain about opening notepad in QTP and writing of test result in notepad?