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
How did you resolve conflicts present in Object Repository?
Explain advantages and disadvantages of ddf?
what is output value in QTP and how it can be used in automation testing
What is method name to compare two XML files.
What kind of performance is expected on the client side (e.g., how fast should pages appear, how fast should animations, applets, etc. load and run)?
What are the check points can be inserted without recording?
How many types of actions are there in quicktest professional?
How to find a window is minimized or not
any body plz send health care domain project to me with explanation any two modules on that project. mail_id: ranjith_99reddy@yahoo.co.in
How can you send user defined messages to test report?
what are the utilities and drivers
I have written a code to fetch values fro access db and place in the fields. Iam using GetROProperty to fetch runtime values. Now i want to add runtime values to the access db in field v3. please help me. Its not writting in the db. Option explicit Dim con,rs,db,c Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq=D:\Sales.mdb" rs.open "select * from tax",con Do while not rs.eof Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("incost").Set rs.fields("v1") Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("intax").Set rs.fields("v2") c=Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("outtax").GetROProperty("value") rs.MoveNext print c Loop Do while not rs.EOF rs.EditMode rs.Fields("v3").Value="3" rs.Update rs.MoveNext Loop Set rs=nothing Set con=nothing
please any one can explain the keyword driven framework. with gmail example.
Suppose I created one object as virtual object? That object is applicable to that test? Or all the tests?
What does it mean when a check point is in red color? What do you do?