Here is the sample code for which i am trying to capture the output. .
while running this code, I am not getting any error today but output
is still not written to the file. Can u please help
begin
# Create the new report
r = CLReport.new()
testReport = r.createReport('C:\\ruby\\results\\results.html')
class TC_run_demoTest
def self.suite
$browser = Watir::Browser.new
puts " Beginning of test: "
$browser.goto("www.yahoo.com")
$browser.text_field(:name, "p").set("ruby")
$browser.button(:id, "searchsubmit").click
begin
assert($browser.text.include?("Programming Ruby") )
r.addtoReport(testReport, 'Found test string Programming Ruby',
'PASSED', 'Test passed')
rescue => e
r.addtoReport(testReport, 'String not found', 'FAILED',
'test failed')
end
$browser.close
end
end
r.finishReport(testReport)
rescue
# Send crash info to report
r.addtoReport(testReport, 'Test crashed with reason '+$!,
'FAILED', 'Test crashed!')
r.finishReport(testReport)
end
-------------------------------------------------------
On Jan 17, 12:34 am, JArkelen <[email protected]> wrote:
> Did you use this line to create the variable:
> r = CLReport.new()
>
> Please post your code so I can have a look.
>
> On Jan 16, 10:13 pm, H2006 <[email protected]> wrote:
>
> > Hi
>
> > I am trying to use this class but constantly getting Error: HTML
> > Result file is created but No results added.
> > Can someone help please ??
>
> > " 1) Error:
> > test_print_assertion(TC_demo):
> > NameError: undefined local variable or method `r' for #<TC_demo:
> > 0x3a4682c>
> > temp.rb:49:in `test_print_assertion'
>
> > Thanks.
>
> > On Jan 16, 2:56 am, Jagdeep Jain <[email protected]> wrote:
>
> > > Thanks A lot JArkelen,
>
> > > This is exciting :-)
> > > I have started using this Class ;-)
>
> > > On Jan 15, 8:03 pm, JArkelen <[email protected]> wrote:
>
> > > >http://wiki.openqa.org/display/WTR/HTML+report+class
>
> > > > On Jan 15, 7:53 am, Jagdeep Jain <[email protected]> wrote:
>
> > > > > I got it through Rspec:
> > > > > spec usingrspec.rb --format html > testresult.html
>
> > > > > On Jan 15, 11:31 am, Jagdeep Jain <[email protected]> wrote:
>
> > > > > > I want to populate Watir results to HTML format. Is there any way to
> > > > > > do this?
> > > > > > Or is there any way to have all 'puts' goes to HTML file?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---