cancel
Showing results for 
Search instead for 
Did you mean: 

Steps to Import Python Library in TestComplete

Highlighted
Frequent Contributor

Steps to Import Python Library in TestComplete

Hi All,

Youtube - Import Python Library in TestComplete 

I've prepared a step to import python library using Openpyxl library inside test complete.

Ref 

 

Step 1:

  1. Install python 3.6 – TestComplete 14.4 Support 3.6
  2. Ref: https://www.python.org/ftp/python/3.6.0/
  3. Check for Python version in Cmd : python –version

Step 2: 

  1. Download the python library matching the Python version.Ref: https://www.lfd.uci.edu/~gohlke/pythonlibs/
  2. Install Numpy/Openpyxl library in the system
  3. Install in cmd line as “pip install Openpyxl”
  4. In Command Prompt type “Import Openpyxl”

If you don’t get any error then the python library is installed correctly.

Step 3:

  1. Navigate to default python installed location

Eg: C:\Users\UserName\AppData\Local\Programs\Python\Python36

2. Copy all the files to TestComplete path

Eg: C:\Program Files (x86)\SmartBear\TestComplete 14\Bin\Extensions\Python\Python36

 

Step 4: 

Set your environment variable of python path to Testcomplete path

Eg: C:\Program Files (x86)\SmartBear\TestComplete 14\Bin\Extensions\Python\

 

Step 5: 

from os import sys
import sys

sys.path.append(“C:\\Program Files (x86)\\SmartBear\\TestComplete 14\\Bin\Extensions\\Python\\”)
openpyxl_location = “C:\\Program Files (x86)\\SmartBear\\TestComplete 14\\Bin\Extensions\\Python\\Python36\\Lib\\”
sys.path.insert(0, openpyxl_location)

import openpyxl
from openpyxl import Workbook

 

Ref: https://vallatestcomplete.wordpress.com/2020/06/01/testcomplete-python-library-import/

 

Regards

Valla

With Regards
Vallalarasu Pandiyan | LinkedIn |Vallalarasu.p@gmail.com
2 REPLIES 2
Highlighted
Community Leader

Re: Steps to Import Python Library in TestComplete

i dont use py but thanks a lot for people using it !

Un sourire et ça repart

Highlighted
Community Manager

Re: Steps to Import Python Library in TestComplete

Thank you for sharing @Vallalarasu_P !


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors