Forum Discussion
rraghvani
Champion Level 3
16 days agoI've installed the latest version, TestComplete 15.79.5.7. Python now works, with additional changes required to the scripts - as Python 3.13 treats each global objects e.g. Log, Project, and Sys as a regular scoped object, you now have to pass these as parameters. As an example, Log is being passed as a parameter -
MainTest.py
import MyFunctions
def main():
MyFunctions.greet(Log, "Alice")
MyFunctions.py
def greet(Log, name):
Log.Message(f"Hello, {name}!")
More information can be found in Working with TestComplete Global Objects in Python 3.13
Hassan_Ballan
Champion Level 3
14 days agoJust adding a small note in case it helps anyone—nothing definitive, just potential angles to consider:
- Python 3.12+ changed how interpreter isolation works, so some of the missing Sys, Log, Aliases, etc. in imported modules might be tied to Python’s own changes rather than only TestComplete.
- This could be why newer builds require more explicit imports like from tc import *.
- If people use shared libraries outside the project folder, it may also be necessary to add those paths into TestComplete’s Script Directories instead of relying on Python to find them automatically.
- Even though 15.79 appears to fix the major errors, some script adjustments might still be expected because of Python’s new behavior.
Again—not claiming certainty, just sharing possible reasons and areas to look at.
🤖 AI-assisted response
👍 Found it helpful? Click Like
✅ Issue resolved? Click Mark as Solution