Joe,

Since the report is a basic .html file, you can open/view/"launch" it
just like any other web content.  You could launch a browser and
supply the browser.goto command with the file name you defined earlier
(from the tutorial):

@report = @html.createReport('google_search', 'Google Search',
browser_type)

As I understand it, this should create a file named
"google_search.html". So that you don't have to repeat this code for
each script you create, you'd want your report name set as a variable
that you can access later.  Obviously there's a lot of exception
handling and validation you would want to add, but here's an idea of
how you could handle it:

----- test.rb
report_name = "google_search" #
path_to_report = "C:/Logs/#{report_name}.html"
@report = @html.createReport(report_name, 'Google Search',
browser_type) #FROM TUTORIAL

<!-- code code code -->
<!-- code code code -->

@html.finishReport(@report, browser_type, test_environment) #FROM
TUTORIAL
view_report(path_to_report)

----- includes.rb
def view_report(report)
   @report_browser = Watir::Browser.new
   @browser.goto report
end #view_report

On Jul 2, 5:53 pm, Joe Touhey <joetou...@gmail.com> wrote:
> Hi,
>
> I am using the report class 
> athttp://wiki.openqa.org/display/WTR/HTML+report+class+%28version+2%29.
> What I would like to do is launch the report that I created during my
> test at the end of the test. Can someone give me a hand with the code
> to do this?
>
> Have a great day,
> Joe Touhey

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com

Reply via email to