Ask a Question

Regarding importing third party libraries in python test complete

abhi1234
New Member

Regarding importing third party libraries in python test complete

I have imported the python libraries to the Test complete path . Now I am trying to import win32api . No module found error is coming.

 

location = "C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\Bin\\Extensions\\Python\\Python38\\Lib\\site-packages\\win32\\win32api.pyd"

sys.path.insert(0, location)

import win32api

 

No module found error is coming.

1 REPLY 1
EdenWheeler
Occasional Contributor

It looks like you are trying to import the "win32api" module in TestComplete using Python. You have already added the path to the "win32api.pyd" file in your system using the "sys.path.insert()" function.

 

However, you are still getting a "No module found" error when trying to import the "win32api" module.

One possible reason for this error could be that the "win32api.pyd" file may have dependencies on other files that are not present in the TestComplete environment. In that case, you may need to add the path to those files as well in the "sys.path.insert()" function.

 

Another possibility is that you may have misspelled the module name or it might not be installed correctly in your system. You can try checking the spelling of the module name and also make sure that it is installed correctly.

 

You can also try using the "pip" command to install the "pywin32" package, which includes the "win32api" module. To do this, open a command prompt and run the following command:

pip install pywin32

 

This should install the "pywin32" package and make the "win32api" module available for use in TestComplete.

 

Once you have installed the package, you can import the "win32api" module in your TestComplete script like this:

 

import win32api

 

I hope this helps! 

cancel
Showing results for 
Search instead for 
Did you mean: