Forum Discussion

lalit_singh's avatar
lalit_singh
Contributor
2 years ago
Solved

Updating python version

I am having TestComplete Version as 11.31

And the python version in C:\Program Files (x86)\SmartBear\TestComplete 11\Bin\Extensions\Python\Python34 as 3.4.3

I want to third party library for reading data in pdf file by using pypdf2

but it requires python version to be at least 3.6

How can I achieve that"?

  • Unfortunately it's not possible to update the Python version that comes with TestComplete. The only option is to update TestComplete. The latest version comes with Python v3.8.10.

     

    Note, when you import certain Python packages, they may not work with the Python that comes with TestComplete. See Python - Specifics of Usage

7 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Unfortunately it's not possible to update the Python version that comes with TestComplete. The only option is to update TestComplete. The latest version comes with Python v3.8.10.

     

    Note, when you import certain Python packages, they may not work with the Python that comes with TestComplete. See Python - Specifics of Usage

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    It's a possible solution, which I think could work for you.

    • lalit_singh's avatar
      lalit_singh
      Contributor

      Thankyou for the information!!
      Will try and check if it works

      • lalit_singh's avatar
        lalit_singh
        Contributor

        With the use of WshShell object, it is showing an error as WshShell not defined ,
        is there something to defined in the import section?

        For ref

        WshShell.Run("powershell -file C:\\testReportProject\\.venv\\Scripts\\test1.py")

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    You could install the latest version of Python and PyPDF2. Write a little Python script which accepts two parameters for the two PDF files, compares the documents, and output the results. Using TestComplete, use WshShell Object to call the Python script and read the output results.

     

    Reading the output results, see the coding shown in Running PowerShell Scripts From TestComplete

    • lalit_singh's avatar
      lalit_singh
      Contributor

      So , you mean to say I should separately validate the pdf in latest version of python

      and use that result in the testcomplete for reading the result