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')

 

This is perhaps not a big issue but still a problem since I trust that the help is up to date and that I may follow the API described there to write tests. A lot of effort goes in to figuring out what is wrong that could be spent elsewhere.

 

  BR, Johan

 

[1] https://support.smartbear.com/viewarticle/75112/

  • 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

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Johan,

     

    Thanks for reporting the issue. Do you see it in the latest product version – v. 11.20?

     

    • JohanH's avatar
      JohanH
      Occasional Contributor

        Hi,

       

      I'm using 11.20.1491.7

       

        /Johan

      • joseph_michaud's avatar
        joseph_michaud
        Moderator

        Try CC-5346 Python: cumulative patch for 11.20

        My simple testing shows TestedApps.MyApp.Close() as returning True or False (but never None)...

         

        [edit - remove link]

  • malj's avatar
    malj
    Contributor

    I'm Johan's colleague and I have a SmartBear account. What is Salesforce? Do we really need it to be able to download patches?

      • dbattaglia's avatar
        dbattaglia
        Contributor

        For all the users that are not reading this particular discussion thread, how are they going to know that they need this patch to fix a known issue?

         

        Did you send out an email to all registered accounts?

        I did not see one.