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 the Obect Repository type, we use in Automated Testing..in Real time.. Pls anybody can give the answer.. Thanks in advance...

5 Answers   Navis,


Explain about business process component? types and usage?

0 Answers  


How to manage a drag drop event in the qtp

3 Answers  


7. Given scenario is like this: One Web table is there and you have to search and retrieve a cell data which is equal to the given number say:123. Assume you have given with the column name/id of the table where the number may exist. So now you have to go to the given column and search for the number 123 and retrieve it along with the row number of it.

4 Answers  


explain structured testing? plz guys with exp. do answer

0 Answers  






what is review

0 Answers  


w is output value

3 Answers   MBT,


did you perform retesting(DATA DRIVEN test) using functions with out using datatable methods how can you perform retesting using functions

3 Answers  


How to integrate the qualitycenter with qtp

0 Answers   Wipro,


how to i add the values using the check points property?( i.e valid data(for valid data it's giving the footer message:value is added) and for invalid data: special chars, spaces,Duplicates and null values (in my page when ever we enter special chars, spaces and null values, it's giving the proper warning message and for Duplicates it's giving the footer message:"value already exists)?

0 Answers  


what is meant by iterative model?What is its working principle?What are its advantages and what are its drawbacks?

2 Answers  


hi everyone today is the first time i saw this website,and hi iam siraj,iam very impressed by seeing evryones response towards questions,iam a newcomer and i have got tryining in testing can anyone please send me some projects relaited to testing.i know it is very confidential but still if u send it will a great help. my mail id venku_krs@yahoo.co.in

1 Answers  


Categories