How to retrieve value (data) from notepad using QTP ?

Answer Posted / harshitha

Set f2=f.OpenTextFile("c:\text.txt")
While f2.AtEndOfStream <>true
f3=f2.readline
x=Split(f3, "")
msgbox x(0)
msgbox x(1)
WEnd

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain different checkpoints in qtp.

715


I want to know what are QTP functons and what are VB script functions. What is the difference between them.When we have to use these functions.

1294


Can anyone pls tell me in realtime (descriptive programming) how will the properties of the object be given to the test team. R they given in an excel sheet and is the same sheet also given to the development team and by whom is this given? Thanks a lot.

1556


How to call a test from another test?

675


How can you write the scripts that operate on different objects depending on run-time information?

2108






How do you send email with attachment from outlook using qtp ?

559


Can U Explain about QTP tool from older version to latest version also its differences?

1508


Which scripting language used by quicktest professional (qtp)?

658


Can any one tell me how to write a script for selecting open option in File menu of A word document.here you have to add objects to OR.try like that and give me the ans.i asked this question to so many but no one knows.if any one know the answer plz let me know

1397


Explain the Different types of QTP test assets and their extensions?

599


What are the data types in qtp?

660


What is the standard timing delay for web based application in qtp?

582


Discuss the QTP Environment?

616


What is the difference in testing a client-server application and a web application?

576


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

1476