Forum Discussion

felipefigueired's avatar
felipefigueired
Occasional Contributor
8 years ago
Solved

Failure Print's Log Scripts Function - TestComplete 12

“We are having a problem in the version of TestComplete / TestExecute version 12. We have a SmokeTest script that performs several tests on the system screens every day. If the system displays a fai...
  • tristaanogre's avatar
    tristaanogre
    8 years ago

    I don't think that's the problem.

    Try something...  In your code, rather than designating X, Y, Height, and Width, just put "Sys,Desktop" in the picture parameter. The way TestComplete works is that doing so will implicitly call the "Picture" method of the object and post it to the log.  Now, this will include the FULL desktop which might include multiple monitors (which, based upon your screenshots, you are using), but at least it will verify that the picture part of the Log.Error is still working.

    Next trouble shooting is then to double check and make sure that the variables you are setting are actually integers and are the correct values at that point in the code.  Drop a break point on the line that logs the message with the picture and inspect the variable values.  If the picture isn't logging, the problem might be in those values somewhere.  It's possible that the code you are using to set those values is not setting them properly and, therefore, they aren't doing what you want.

     

    Finally, again, because you are using multiple monitors, if your hardware configuration has shifted a bit (such as if a monitor that used to be monitor ID 1 and is now 2 or 3) or if your screen resolution is changing, you could be passing improper values based upon old configurations.

    But, essentially, let's start at the top and make sure that you can take a screenshot of your desktop.

  • felipefigueired's avatar
    felipefigueired
    8 years ago

    Robert, I got it sorted out.

     

    According to your point about logic, I've reviewed all the code.

    In the moment of capture the size and location of the program was coming dirt with incorrect values. By clearing and firing the "refresh command" (Aliases.Corporate.Refresh ()) on the controls, it captured the size and location correct. Now the Print Screen Command again only work on the system and even with 2 monitors.

     

    Thank you very much for the help and analysis.

     

     

     

     

    Felipe Figueiredo