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


Please Help Members By Posting Answers For Below Questions

What are the features supported by UFT?

671


How many types of object repository in qtp?

608


How the exception handling can be done using quicktest professional?

545


What are advantages of test automation?

663


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..

1721






please give me the code for doing retesting of gmail login page using functions so the function has to give the value

1546


Can you write a script to check if the folder exists or not?

515


Whar are the challenges do we face while testing web based applications using the automation tool QTP or any??

1636


Write the script to delete the mail which is at 9th,13th and 18th place in INBOX of Gmail ?

1675


How you debug your script?

569


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

1403


What is quicktest professional?

559


What is throw object?

1745


How do you synchronization point through DP?

599


In keyward driven framework what will be the step for yahoo login page ,inbox logout,plz explain in detail

1499