What is InStr()

Answers were Sorted based on User's Feedback



What is InStr()..

Answer / chn

Mr chandrashekar .......... if u want to give the brief
explanation abt any Question...... Write here itself .....
No need to provide ur contact details .........

It's very bad part of it ........


Chn

Is This Answer Correct ?    14 Yes 3 No

What is InStr()..

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

What is InStr()..

Answer / kalyan

Here I am Providing the right answer. If U want to find the
first occurance of substring with in string then u can use
the instr function.

any doubts mail to

mskalyan.smile@gmail.com

Is This Answer Correct ?    5 Yes 4 No

What is InStr()..

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

What is InStr()..

Answer / nanda

I Agree with Krishnachand.

Is This Answer Correct ?    0 Yes 5 No

What is InStr()..

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

Post New Answer

More QTP Interview Questions

What is throw object?

0 Answers  


What is the difference Between LowLevel and Normal Recording Modes?

1 Answers  


What is test object model in quicktest professional?

0 Answers  


How to connect to data base?

2 Answers  


I open login gmail page after that QTP is not able to identify the object present in it then what u will do

3 Answers   Accenture,






What is chaild object method? When we will go for chaild object method? How to use chaild object method?

2 Answers  


How to add a page checkpoint to your test?

1 Answers  


Can anyone explain about Keyword driven framework in detail and how to use it in case of any project

4 Answers  


Hi All Below is my script which i made for lgin into Flight.exe. SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\","open" Dialog("Login").WinEdit("Agent Name:").Set DataTable ("p_Text", dtGlobalSheet) Dialog("Login").WinEdit("Agent Name:").Type micTab Dialog("Login").WinEdit("Password:").SetSecure DataTable ("p_Text1", dtGlobalSheet) Dialog("Login").WinButton("OK").Click If Dialog("Login").Dialog("Flight Reservations").WinButton ("OK").exist Then Dialog("Login").Dialog("Flight Reservations").WinButton ("OK").Click datatable.Value(3)= "Incorrect password. Please try again" Dialog("Login").WinButton("CANCEL").Click elseif Dialog("Login").Dialog("Flight Reservations").WinButton("OK").exist Then Dialog("Login").Dialog("Flight Reservations").WinButton("OK").Click datatable.Value(3)="Please enter agent name" Dialog ("Login").WinButton("CANCEL").Click elseif Dialog("Login").Dialog("Flight Reservations").WinButton("OK").exist then Dialog("Login").Dialog("Flight Reservations").WinButton("OK").Click datatable.Value(3)= "Please enter password" Dialog("Login").WinButton ("CANCEL").Click else Window("Flight Reservation").Move 309,146 datatable.ExportSheet "C:\Raj\Result.xls" ,1 Window("Flight Reservation").Close End If I want to capture the Message string from Dialog("Login").Dialog("Flight Reservations" Also pls let me know if this is the right way to do the script for login. Pls provide some script for login Flight.exe Thanks in advance Raj Dhiman

1 Answers  


Hi, is it possible for recording shortcut key during record session? The application on which I am working is web based application. This application has several shortcut key associated with menu option. I have succesfully recorded all menu option but unable to record shortcut key.

0 Answers  


how do you find the number of occurences of string QTP from the expression , " QTP+QTP=2QTP"

5 Answers   IBM,


Hello everyone! I am just writing a small test for a windows application. I have a problem with a text output value. The value i am trying to catch is presented in a scrollable textbox. When the text is too long, only a portion of it gets captured. Do you have any experience with this?

0 Answers   HSBC, T Mobile,


Categories