Thanks Adam.  Kind of weird...I was the one that updated the original
code and added it to the wiki, but now it's being credited by someone
else.



On Jul 6, 9:09 am, Adam Reed <[email protected]> wrote:
> 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
>   �[email protected] report
> end #view_report
>
> On Jul 2, 5:53 pm, Joe Touhey <[email protected]> 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: [email protected]
To unsubscribe: [email protected]

Reply via email to