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?
Answer Posted / 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 |
Post New Answer View All Answers
What are the features supported by UFT?
How many types of object repository in qtp?
How the exception handling can be done using quicktest professional?
What are advantages of test automation?
How can i test an application like Google Earth.In my application data will be fetched from a oracle database based upon which graphs are generated..so these all are dynamic..how can i use qtp here..alongwith that how can i test the map generated by a satellite just like google earth..
please give me the code for doing retesting of gmail login page using functions so the function has to give the value
Can you write a script to check if the folder exists or not?
Whar are the challenges do we face while testing web based applications using the automation tool QTP or any??
Write the script to delete the mail which is at 9th,13th and 18th place in INBOX of Gmail ?
How you debug your script?
What is meant by Step generator?what is the use of this? we have 3 steps know there what r all those.? can u all pls give me clear idea of this
What is quicktest professional?
What is throw object?
How do you synchronization point through DP?
In keyward driven framework what will be the step for yahoo login page ,inbox logout,plz explain in detail