Sorry Bindhu, I have never used CLReport. so can't help you on it.
Though I can share with you the sample script that I use. It goes as follows
->

  def open_log_file(log_name)
    if(File.exist?(log_name))                       #If the log file already
exists, attach the new results to it
      @@log = File.open(log_name,"a")      #Log the test details in Log.html
file
      @@log.puts("<head><link REL='stylesheet' TYPE='text/css'
href='log_stylesheet.css'></head>")
    else                                                   #If the log file
does not already exist, create a new file
      @@log = File.open(log_name,"a")      #Log the test details in Log.html
file
      @@log.puts("<head><link REL='stylesheet' TYPE='text/css'
href='log_stylesheet.css'></head>")
      @@log.puts("<table border='1'>")
    end
  end

  def log_pass(summary, description, result)

@@log.puts("<tr><td>#{summary}</td><td>#{description}</td><td>#{result}</td><td><font
color=Green><b>Pass</b></font></td></tr>")         #Log success
  end

  def log_fail(summary, description, result)

@@log.puts("<tr><td>#{summary}</td><td>#{description}</td><td>#{result}</td><td><font
color=Red><b>Fail</b></font></td></tr>")         #Log failure
  end

  def test_01_new_test
    open_log_file("Test_Results.html")
    @@log.puts("<tr><td><b>Test For Forgot Password
Functionality<b></td></tr>")
    log_pass("Test_Forgot_Password", "Sending mail for forgot password",
"Successful")         #Log Success
    log_fail("Test_Forgot_Password", "Sending mail for forgot password",
"Failed")         #Log Failure
  end

-Prajakta


On Fri, Oct 9, 2009 at 11:36 AM, Bindhu <udayarekha2...@gmail.com> wrote:

>
> Thanks Prajakta and Rohan for ur quick reply,
> And sorry to bother you again...
>
> I the below code in every script
>
> r = CLReport.new()
> testReport = r.createReport('D:\\Automation\\ReportName')
>
>            <<<<< Script to be executed>>>>>>
>
> end
> r.addtoReport("testReport","TC_001", 'PASSED', "New Account Created
> for Regular Savings,Personal (10) and class code of Individual with
> Account No :")
> r.finishReport(testReport)
> rescue
>   r.addtoReport(testReport, 'Test crashed with reason '+$!, 'FAILED',
> 'Test crashed!')
>  r.finishReport(testReport)
>
> And based on ur sugesstion I m trying to use CLReport.open(). But it
> is not working. Please extend ur help.
>
> Rohan,
> I m really not aware what is rake.Can you please provide me some
> example.
>
> Thanks in Advance
>
> On Oct 9, 10:20 am, Prajakta Jadhav <jadhav.praja...@gmail.com> wrote:
> > Shouldn't be a problem. Open the same html file in both the scripts for
> > logging the results. It will log the results one after another in the
> same
> > html file.
> >
> > -Prajakta
> >
> >
> >
> > On Fri, Oct 9, 2009 at 10:31 AM, Bindhu <udayarekha2...@gmail.com>
> wrote:
> >
> > > Hi All,
> >
> > > In batch file I have included 2 scripts to be executed. After a
> > > successful execution of this batch I want to print the results in one
> > > HTML file.
> > > As of now I am able to print the one HTML file for one script. But I
> > > want a single HTML file to be printed for multiple scripts which I
> > > have inculded on batch file.
> > > Please guide me.
> >
> > > Right now I am using the code which is available in wiki..
> >
> > > Thanks- Hide quoted text -
> >
> > - Show quoted text -
>  >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to