ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
suppose im having a string wipro123xyz i need to get the
value 123 only from the string today 123 will be in the
middle from tommorow it will be changing to front or back
how to get the no if it changes continously?
 Question Submitted By :: Mohammad
I also faced this Question!!     Rank Answer Posted By  
 
  Re: suppose im having a string wipro123xyz i need to get the value 123 only from the string today 123 will be in the middle from tommorow it will be changing to front or back how to get the no if it changes continously?
Answer
# 1
Function RegExpTest(patrn, strng)
   Dim regEx, Match, Matches   ' Create variable.
   Set regEx = New RegExp   ' Create a regular expression.
   regEx.Pattern = patrn   ' Set pattern.
   regEx.Global = True   ' Set global applicability.
   Set Matches = regEx.Execute(strng)   ' Execute search.
   For Each Match in Matches   ' Iterate Matches collection.
      RetStr = RetStr & Match.Value' & vbCRLF
     Next
   RegExpTest = RetStr
End Function
a=(RegExpTest("[0-9]", "1234_Today"))
msgbox(a)
"a" contains the numbers in the given string from 1st to 
last position.
If anybody know smarter way to achieve above task, please 
post the answer.
 
Is This Answer Correct ?    0 Yes 0 No
Aiswaryan
 
  Re: suppose im having a string wipro123xyz i need to get the value 123 only from the string today 123 will be in the middle from tommorow it will be changing to front or back how to get the no if it changes continously?
Answer
# 2
txt="123wiproxyz"
mypos=instr (1,txt,"123")
msgbox mypos


k=mid ( txt,mypos,3)
msgbox k
 
Is This Answer Correct ?    2 Yes 0 No
Sailaja
 
 
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
how to write regular expression for Date field? Google7
How to export QTP results to an ".xls" file?  3
How does QTP identifies the object in the application Convergys5
What is the real use of different actions in QTP  1
Hi Everybody, Can anybody please tell me the how to display the result of the QTP in the notepad text file rather than in the QTP result window. Suppose this is my simple script:WHich will open the notepad file and enter some text and then will change the font then will calculate how much time has been taken.Now, in this script i want to display the result in notepad file. Dim s Dim starttimer,endtimer,timeit s="uyetuywqtywqte" SystemUtil.Run "notepad","","Y:\","" Window("Notepad").WinEditor("Edit").Type micCtrlDwn + "s" + micCtrlUp Window("Notepad").Dialog("Save As").WinEdit("File name:").Set "test1" Window("Notepad").Dialog("Save As").WinEdit("File name:").Type micReturn Window("Notepad_3").Type s Window("Notepad_3").WinEditor("Edit").Type micCtrlDwn + "s" + micCtrlUp starttimer=timer Window("Notepad_3").WinMenu("Menu").Select "Format;Font..." Window("Notepad_3").Dialog("Font").WinEdit ("Font:").Type "cou" + micDwn Window("Notepad_3").Dialog("Font").WinComboBox ("Font:").Select "Courier" Window("Notepad_3").Dialog("Font").WinEdit ("Font:").Set "Courier" Window("Notepad_3").Dialog("Font").WinEdit("Font:").Type micReturn endtimer=timer timeit=endtimer-starttimer print(timeit) Please also tell me where the function for the text file result will be declared and where it should be called. Thanks, Gaytri  2
Can we create test script with out Step Generator?  4
Hi PLZ explain User Defined Functions in QTP with eample? Ordain-Solutions2
Waht is User interface and Integration Testing?  1
What is our exact stage involvement with QTP?  1
How can we get the result from WindowsXP Command Window? (e.g. After we input 'ipconfig' in command window, how QTP get the result?)  2
Hi Friends,will any body tell to Me for which Auomation Tool their is great Requirement inht eMarket Eithr the QTP or WINRUNNER and for what reason and how long it is going to remain and wat the Scope for the automation Testing In the Future Please tll to Me In Details Ok .  2
WHAT IS THE USE OF "FUNCTION GENERATOR" IN QTP? CTS7
Hi all please solve this.It is urgent..... When I right clicked on a Web image manually It displayed Open link,open link in new window,save picture as, Email picture,Printpicture,propeties...etc. While automation I have written a code like this 'browser("Google").Page("ramseeker®: Memory and_3").Image ("graphOfModel").Click 10,10,micRightBtn But the right click menu was not displayed. I want to save that image in a seperate folder  6
Give me diffrent script in QTP for Webpage(Java and .Net),WindowsBased Applications,Java application,.Net application... Virtusa2
how to record a word doc using qtp i.e open a word doc,type something and save the doc can someone send me the code.  2
What is the diffrence bettween QTP 9.0 and QTP 9.1?  1
What are the difference between QTP and Winrunner  5
What are the enhancements u did after recording ur script?  3
How can we write script for a .net application in QTP? Can we use VB Script for .net application.  1
How to write test cases for web applications using QTP.plz write a sample test case to show how to write.urgently needed.thanks in advance..  1
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com