Forum Discussion

Dave1's avatar
Dave1
New Contributor
7 years ago
Solved

How write pythons`s methods

Hi All,

I have question about writing scripts in Python. I would like write one method and use it in others because I have part of code which I need in all methods. Do you have any idea for it ? How can I do it ?

I wanted to do like below, but TestComplete shows error.

 

  • creating of the object is not correct is your script. This is not TestComplete issue.

    You would need the following:

     

    def test():
        a = TestedApp()
        a.normalInstallation()

2 Replies

  • creating of the object is not correct is your script. This is not TestComplete issue.

    You would need the following:

     

    def test():
        a = TestedApp()
        a.normalInstallation()
    • Dave1's avatar
      Dave1
      New Contributor

      Hi Bonibom,

       

      Thank you for answer! It solved my problem.