Forum Discussion

JohanH's avatar
JohanH
Occasional Contributor
9 years ago

TestedApp.Close return value is None in Python

  Hi,   The help[1] stated that TestedApp.Close() should return True if the app was closed within the auto timeout time, False otherwise. In python the returned value is None ('Undefined')   Thi...
  • JohanH's avatar
    JohanH
    9 years ago

      Hi,

     

    My bad! :smileyembarrassed:

     

    I looked at the wrong Close method...

     

    As my example showed I was using the return from TesteApp.Run(), which is a Process object. Process objects do have a Close and Terminate method but they return None. Why they do not return the more accessible True or False is another question. You have to use p.Exists or p.IsOpen to figure out if the call to Close (and Terminate) succeeded in closing the app/process.

     

    https://support.smartbear.com/viewarticle/71647/

     

      BR, Johan