Forum Discussion

MulgraveTester's avatar
MulgraveTester
Frequent Contributor
10 years ago

log.picture bug

From time to time I get caught out by the log.picture bug. If you want to log a picture you use

log.picture (obj.picture)   [This works]

 

but if you want to log a picture with message text the help file for picture method says

Log.Picture(PictureMessageTextAdditionalInformationPriorityAttrFolderID)

 

Which means that this line should be valid

log.picture (obj.picture, "my message") [Syntax error]

but this always results in a syntax error at the comma.

 

You have to use the same command without brackets

log.picture obj.picture, "my message" [This works]

 

The command should parse with the brackets, as do all the other log methods. Please fix this bug.

  • Hi Michael,

     

    In VBScript, to call a method with parameters you need to either use the Call keyword:

     

    Call Log.Picture(obj.picture, "my message")

    or omit the parentheses around the parameter list:

     

    Log.Picture obj.picture, "my message"

    This is standard VBScript syntax, and not a TestComplete issue.

     

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Hi Michael,

     

    In VBScript, to call a method with parameters you need to either use the Call keyword:

     

    Call Log.Picture(obj.picture, "my message")

    or omit the parentheses around the parameter list:

     

    Log.Picture obj.picture, "my message"

    This is standard VBScript syntax, and not a TestComplete issue.