Forum Discussion

Steve2's avatar
Steve2
New Contributor
9 years ago

Posting an error to the log containing a link?

I am using a custom comparer when running my test. In order to post the correct results to the log I need to run my comparer, fetch the result, and in case of failure I have to execute files.compare in order to get messages to the log. This will give me 2 separate log-entries: an error (since I have specified this in de files.compare) which includes a picture for some reason,  followed by a message with a link. Clicking on this link wil open my custom comparer with both files.

 

What I would really like not to have to compare the files twice, and I would like to have only 1 log-entry for this. Also, I need to keep my logs small, so I would like to be able to keep the picture out of it. In order to achieve this it would be nice if I could:

1) Post a Log.Link with parameters so I could point it to my custom comparer and provide it with both files to be compared

2) Determine that my Log.Link should be an "Error" log-entry instead of an Log.Message

3) Determine that files.compare not add a picture to the log.

4) Integrate the files.compare Link line with the error line.

 

1 Reply

  • Marsha_R's avatar
    Marsha_R
    Icon for Champion Level 3 rankChampion Level 3

    I would try something like this:

     

    MyResultVariable = MyCustomComparer(file1,file2)

    If MyResultVariable = True then

        Log.Message

    Else

        Log.Error