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 |
anyone can explain about "Smart Identification" in QTP. what is the use of "Smart Identification" ???
What are different types of frame works ?
If the object property is changing very frequently, what was your approach?
Hello Everyone, I have a problem. QTP is capturing no action on a particular page in the application that I am trying to automate. But on the same side its working fine on other pages of the same application. Can someone please help me understand the reason behind this inconsistency.
Explain Descriptive Programming Types with Examples?
how to get column count in datatable
How i can use Regular expression in QTP?give detailed steps for it.
can any one please tell me which is the best institute in Bangalore to learn QA (crash course)? Thanks
What is output value? How many types of output values are there in qtp?
how to test Web application using QTP software
In smart identification, explain about 1. Base filter properties 2. optional filter properties with examples?
I want to grow as a Automation Engineer,Kindly help me in clearing my interview that what interviewer looks for as a Automation Engineer. I am having three years of experience in testing.