HttpWatch Automation Reference - Version 13.x
Using HttpWatch Automation with Ruby / Ruby - Opening a Log File
In This Topic
    Ruby - Opening a Log File
    In This Topic

    HttpWatch log files (.hwl) can be opened manually in HttpWatch Studio or through the HttpWatch automation interface.

    If you are writing a program from scratch to open an HttpWatch log file you first need to create an instance the Controller object.  Then open an existing log file using the Controller object's OpenLog method:


    Opening an HttpWatch Log File (.hwl)
    Copy Code
    # You always need to create an instance of Controller to use the HttpWatch Automation
    controller ='HttpWatch.Controller')
    # Open the log file and keep a reference to the returned Log object
    log = controller.OpenLog("c:\\temp\\test.hwl")
    # Access the data in the log file using properties of the log object
    printf "The log file contains %d entries", log.Entries.Count


    Note that the OpenLog method returns a Log object directly and does not use the Plugin object. Therefore it is not necessary to create a browser instance to open existing log files.

    See Also