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

Hi Guys, I tried to install java add-in for QTP 9.5 after the whole installation but it didn't install but then i also found in documentation saying that winrunner7.6 patch for java plugin would work fine with QTP. But when i tried to install from winrunner7.6 it asks me for the path of winrunner So my question is are we supposed to install winrunner for java add in to work on QTP. Please suggest me

1 Answers  


What is checkpoints for qtp?

0 Answers  


If I want to run more than one test (With different functionality) with in one script, then what i do? plz. explain with any example.

4 Answers  


Use of Debug Viewer?

1 Answers  


How exactly you start scripting in QTP? In the interview he was not satisfied with my answer.Please post what is correct answer.

5 Answers  


What is the scripting language used in QTP?

11 Answers   IBM,


What are the types of Object Repositories in QTP?

1 Answers   Ordain Solutions,


Explain the keyword driven framework for the window based application complete creation of library files,env file,test data,recovery file,excel file ,repository etc and as a test engineer how is ur approach

0 Answers   AppLabs,


Why is action split used by qtp?

0 Answers  


I am Facing Issues with learing datepicker 1)when i first learn datepicker as current system date . 2)if i wanna runtime datepicker value it gives error

0 Answers  


If the web applicatoin takes navigation time above 2 hours to dispaly next Web page then how can we synchronize the QTP with Appilication Under Test

4 Answers   TCS,


How can i find out any "text's" coordinates in excel sheet For example: I want to know the coordinates of "F" Column in the excell sheet While recording when i clicked on F column it is showing the coordinate values 385,9 but with out recording how can i find out them Suppose i want to clik on "H" column writing the script like this Window("Book1").WinObject("Book1").Click (...........) Here I Dont know what (x y )values should i enter Please any one can help me?

1 Answers   Livetek,


Categories