How to write QTP test results to an Excel application, Please provide the exact code if possible ASAPThanks in advance

Questions by upatk

Showing Answers 1 - 4 of 4 Answers

Prakash

  • Jun 1st, 2006
 

Example

Dim fso, f1
Set fso = CreateObject("Scripting.FileSystemObject")
Set f1 = fso.CreateTextFile("D:\testfile.xls", True)

and Then use If condition's

to store the results

If Browser("abc").Page("xyz").Exist Then
 f1.writeline("Step1 Login details  is pass")
 else
 f1.writeline("Step1  Login details is Fail")
 End If

  Was this answer useful?  Yes

Object Not Found

  • Jun 21st, 2006
 

The above answer is valid only if you want to route the data to a single column. If we want to send the data to multiple columns in a .xls file, we'll need to parse  the data so that it is  routed to specific columns.I tried it but am getting confused.............still workng  on it

  Was this answer useful?  Yes

avnsbabu

  • Jun 27th, 2006
 

How to get the data from excel to script. Parameterizing fields

Can you send me exact code.

Thanks in advance

avnsbabu

  Was this answer useful?  Yes

venkata ramana

  • Jul 27th, 2007
 

I am writing one example.

set fso=createobject("scripting.filesystemobject")
set g=fso.createtextfile("c://results.xls",2,true)
set k=fso.opentextfile("c://login.txt",1,true)
while k.atendofline<> true
j=k.readline
with Browser("some").page(some")
.webedit("username").set j
webedit("Password").set"dsfd7483jih38343fdksfj309493043jfhx"
.webbutton("click").click
if Browser("some").page(some").exist then
g.writeline("test is pass")
else
g.writeline("test is fail")
endif
wend

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions