Showing results for 
Search instead for 
Did you mean: 

Importing pyautogui - need real help please!!!

Occasional Contributor

Importing pyautogui - need real help please!!!

Has anyone get any luck importing pyautogui into TestComplete? 
This error pops up when I do "import pyautogui" in my script.


Where do I go about to check TestComplete's system path [or somehing like that] so that TestComplete IDE can recognize this library pyautogui??  
Where should I put a "pyautogui" (which I get  from a different PC drive) to make it visible to TestComplete python interpreter? Currently I have uninstalled all python programs I previously had so that Test complete wont get confused, but it still gives me this error when ever it get to the line import pyautogui



To make things more misterious, I put the pyautogui folder into the Lib folder of my TestComplete 14 folder (please see the last 2 screenshots) I ran python.exe on CMD and then ran import pyautogui, something works, looks like pyautogui only get recognized here, but it is useless to me. I need it works in TestComplete IDE

What are my options? Please help. Thank you for your time!



Community Hero

Re: Importing pyautogui - need real help please!!!



Check if these links help:


P.S. Out of curiosity, considering its name, what does pyautogui contain that you definitely need for TestComplete?


[Community Expert Group]
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.

Re: Importing pyautogui - need real help please!!!

pretty much use the same code as the screenshot below but replace the path with your own absolute path to the directory where you have your external python modules that you downloaded with pip. On PC's they are usually in the appdata\local\programs\python\pythonx.x\Lib\site-packages.

And you want to keep this system path at the top at a global level outside of your function defenitions in your script/TestComplete IDE.


Occasional Contributor

Re: Importing pyautogui - need real help please!!!

I got this auto-populated entity Sys instead of sys.

What's the difference b/w Sys and sys.


When I do a dot keystroke, there is no "path" available in the context-menu that appears shortly afther I hit he dot key. So obviously Sys and sys are different what do they refer to specifically? Thanks


Re: Importing pyautogui - need real help please!!!

Sys is testcomplete looking into your System and all its sub processes. You can go Sys.someprocess.something.something... and drill down into all of your stuff.


"from os import sys" is a python code saying "from the os package import the sys stuff". this is the stuff in python that works with directories and stuff. you want to use the lower case letters and not hit the dot keys. so sys.path is a property of the python module sys, and Sys is testcompletes way of saying your System.


I'm not very good at explaining this stuff Smiley Sad

Community Manager

Re: Importing pyautogui - need real help please!!!

Thanks everybody for your input. 

Hi @HKTCentrix , did you manage to figure this out? Please share the results with us. 

Sonya Mihaljova
Community and Education Specialist

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!