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

Answers were Sorted based on User's Feedback



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

Answer / dinesh

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Documents and
Settings\xxxx.txt", 1)
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
msgbox( strLine)
Loop
objFile.Close

Is This Answer Correct ?    20 Yes 1 No

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

Answer / raghu

this can be done by FILE OBJECT SYSTEM.

Is This Answer Correct ?    3 Yes 2 No

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

Answer / guest

Check Test Settings..

Is This Answer Correct ?    1 Yes 1 No

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

Answer / 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

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

Answer / suneel

Script is working fine.
But when I am executing the script it ran for 5 time.
what should i do if i want to read only once

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More QTP Interview Questions

What is qtpro? What is a quick test professional?

0 Answers  


How to Upgrade or support firefox 2.0 version on QTP 9.0? I have installed QTP 9.0 and installed firefox 2.0. But in REcord and Run Settings, it shows firefox 1.5 in Web tab for browser selection.

0 Answers   TCS,


what is the framework followed by ur company in qtp

5 Answers  


how can we retrieve ten rows from the data table using loop concept?

3 Answers  


What is quicktest professional (qtp)?

0 Answers  


hi guys we r working in office...we write some scripts..suddenly we have a work(5min only) in out side..what will do now,,,used to system shut down or log off or lock or sleep mode,switch use or hibernate?

0 Answers  


How you can decide which type of object repository you have to use?

0 Answers  


in a web table , i want you to click a particular object inside cell

2 Answers  


What are the benefits of quick test pro(qtp)?

0 Answers  


When Object Repository is available what is the necessity of having Descriptive programming which needs more scripting efforts.

3 Answers  


give me descriptive programing code sample flight application in qtp?

8 Answers   CA, IBM,


What is Environment Variable and when we apply this in QTP?

3 Answers   TCS,


Categories