In my QTP script I have a word in notepad that ends in a
question mark, for example... "father?" As part of my
script I want to delete the question mark. How do you
delete a character in notepad?
Answers were Sorted based on User's Feedback
Answer / satya
U can do it with SFO script[I am not sure of Syntax or
exact code,just approach I m Mentioning Below]-
Set oObj=createObject("Script.FyleSystemObject")
oFile=oObj.openTextFile("YourPath")
Do Until EndOfSream
oStr=oObj.readLine
if InStr(oStr,"?")>0 Then
RePlace(oSter,"?","")
Loop
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / lak
Const ForReading = 1
'Save notepad file in D: Drive and type Father? then save
Const ForReading = 1
Const ForWriting = 2
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("D:\Find.txt", ForReading)
strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, "?", "")
Set objFile = objFSO.OpenTextFile("D:\Find.txt", ForWriting)
objFile.WriteLine strNewText
objFile.Close
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / saff
i am asuming there is only one "father?"
string in file
open the desired notepad
and them search for the desired string byusing instr
v = instr(filename,searchstring)'the position of the string
father
b=instr(filename,"?") 'the position of the ?
n =b-n ' will give the size of the string
now use the replace function to replace the ? with whatever
uw want
it will show the position of first occurance of the stirng
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / ratikanta
Word="father?"
Set Fso=Createobject("scripting.filesystemobject")
Set Fs=Fso.opentextfie("path")
X=Fs.Readline
mydata=split(X," ")
If mydata=word Then
str=Replace(mydata,"?","")
EndIf
msgbox str
Is This Answer Correct ? | 0 Yes | 0 No |
i need the licence key for QTP V9.5 can anyone help me on getting this?
Friends please let me know how id following possible in QTP: Can I apply conditional loop on a bitmap/image or any other checkpoint. Like if checkpoint passes then if or Else
Hi, Has anybody attended IBM interview on 17th APR 2010,and got offer letter? I had given interview and selected also but still did not recieve offer letter.
give me an example where u used good judgement and logic in solving a problem
Tell me the situations where we will use Data Driven?
does QTP provides any tools for parametrisation?
What are different versions in Win Runner ,QTP ,Load Runner and Test Director till now and atleast please let me know new features for each version. Ex QTP8.2,QTP 8.5.QTP9.2 supports Mozilla 2.0
If there r 1000 test scripts that were written. If a change to any functionality is to be made then how can we know in which script is this functionality existing.
Subj: realtime example of Database check point, Can any one please detail on how the Database check point is utilized/implemented in a real time project. I already know how to make one by creating DSN/ODBC and writing the required query manually and other steps...I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thank you in advance
Hai Friends this is Rajesh , Is there any Site or Blog that Video tutorials of Qtp that can be free downloadable to Pc. Friends if any body know that site or blog please send me because i'm really in need for that because i cannot affordMoney in learning Course in Institutes due to Financial Problem . So please Forward that Site or Blog which provides Downloadable Video Tutorials in Free to PC , As My Friend is having PC thru that I'm planning to learn. So Kindly help me Friends if you are aware of that Site/Blog
Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks
what is object repository size?