Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"HTML Report"
01-06-2012, 10:14 AM
Post: #1
"HTML Report"

Hi Folks,

Yesterday I atteneded one interview in that he asked question like I have a web page in that I have webtable, How to get webtable data and use that data generate HTML report so please any one give me an idea on above question.
Find all posts by this user
Quote this message in a reply
01-06-2012, 10:46 AM
Post: #2
RE: "HTML Report"
I am not sure if i have understood correctly...

You will be able to get WebTable HTML source code using WebTable().GetRoProperty("outerhtml")

Store it in a variable and write it in your html report. it will give the snapshot of webtable in ur result...

~vIns~
Find all posts by this user
Quote this message in a reply
01-06-2012, 02:06 PM (This post was last modified: 01-06-2012 02:09 PM by vinod123.)
Post: #3
RE: "HTML Report"
i also faced the problem real time in my company. To get HTML report there is registry modification of qtp registries. HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\Logger\Media\Log Change the active DWORD from 0 to 1. What ever is running in qtp script it will generate HTML report at the time of result and it will save it folder name LOG in Results folder

For Eg: F:\Automation Projects\VFS\Res1\Log
Find all posts by this user
Quote this message in a reply
01-07-2012, 10:24 AM
Post: #4
RE: "HTML Report"
For doing so you are expected to have basic html skills.If you already have, then you may write the html code in a text file and save as .html file.Get the cell data from webtable(use getcelldata method) and write it accordingly.
For your easy reference see the below code.
Code:
Set fso=CreateObject("Scripting.FileSystemObject")
Set f= fso.CreateTextFile("C:\html.txt",1)
f.WriteLine "<html>"
f.WriteLine "<body>"
f.WriteLine  "<table border=10>"
f.WriteLine "<tr>"
f.WriteLine "<td>UserId</td>"
f.WriteLine "<td><input type=text/></td>"
f.WriteLine "</tr>"
f.WriteLine"</table>"
f.WriteLine"</body>"
f.WriteLine "</html>"
f.close
Set f= nothing
Set fso=nothing
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)