What In-string function will do?



What In-string function will do?..

Answer / gayathrin

The InStr function returns the position of the first
occurrence of one string within another.
Example :

dim txt,pos
txt="This is a beautiful day!"
pos=InStr(txt,"his")
document.write(pos)

Output :
2

Is This Answer Correct ?    8 Yes 2 No

Post New Answer

More QTP Interview Questions

I have recorded a test using qtp to download a file in an application. Code: Browser("MFA Work Queue Manager").Page("MFA Work Queue Manager").Link("Rules Maintenance").Click Browser("MFA Work Queue Manager").Page("Rule Maintenance").WebEdit("txtSearch").Set "PmtType" Browser("MFA Work Queue Manager").Page("Rule Maintenance").WebButton("Search").Click Browser("MFA Work Queue Manager").Page("Rule Maintenance").WebButton("Export").Click Browser("MFA Work Queue Manager").Dialog("File Download").WinButton("Save").Click Browser("MFA Work Queue Manager").Page("Rule Maintenance").Sync Dialog("Save As").WinButton("Save").Click Dialog("Save As_2").WinButton("Yes").Click Problem: When running this test it gives an error at line no. 5 as Save button object is not identified by it's parent object. This code I ran 4 times after recording at it was working fine but 5th time onwords, it starts giving me the above problem. I used exist property option, Check Property option but none of this changes work at all. Kindly help...

1 Answers   Bank Of America,


how to find that a file has been completely downloaded or not? I told that "download Complete" pop up. but he told the tool doesn't recognize the pop up

1 Answers   Mphasis,


I want to capture data(using keyword) from msdos application using QTP?... Below is little work i could do on it... /* Set app=CreateObject("Wscript.shell") SystemUtil.run ("C:\Users\Agent\Desktop\pumpsim\PUMPSIM.EXE") Window(“PUMPSIM.EXE”).Activate wait(3) app.sendkeys "N" */ Thanks in advance...!!!

0 Answers  


What is an Regular expression doing in VBScript?Tell the pattern for the email verification.

1 Answers   Accenture,


i need the licence key for QTP V9.5 can anyone help me on getting this?

140 Answers  


How to change the run-time value of a property for an object?

3 Answers   Crea,


Explain about datafile/verification of date file when file is not available in local system?

0 Answers  


Hi, I have weblist which contains the data like Design change,admin edit and cost saving etc.. User doesn't know the values existed in weblist. Now the user has to select the right value from the list otherwise the test will fail. Pls help me "To select the correct value from the list"

1 Answers  


I am in .Net development for past 3.5 years and want to enter in to automated testing and learn QTP. For this I need some good tutorial for beginners. I will be really greatful if any one has and they can send it to me on this address- ruchidureja@gmail.com

0 Answers  


Hi all. Could anyone tell me the difference between an Action and a Function in QTP. Thanks in advance and Merry Christmas.

3 Answers   IBM,


Why divide a test into three action calls?

1 Answers  


Why is Client side image is preferred over server side image?

0 Answers  


Categories