Go to Declaration and Find usages options not working
I am currently facing two problems inside script editor in TestComplete 14.10,
Go To Declaration shown disabled in script routine's context-menu when the routines was actually written inside the class
class test: def method1(): Log.Message("Hello World")
from unit1 import test def sampletest(): test.method1()- right click on 'method1()' and see the option 'Go to Declaration' shown disabled, aslo Ctrl clicks not working
Find usages not working for methods inside class
consider the same above example,
right click on 'method1()' inside class 'test' in unit1.py
Click on 'Find Usages' - nothing returns, but that method actually used in unit2.py
Solved! Go to Solution.
While you can use classes in Python in TestComplete, TestComplete is not designed to be a full development IDE of Python. You are writing Python script, not full Python, so the parsing and inclusion of things is a bit different.
Technically speaking, you don't need the class at all. If you pull Method1 out into just a method function without a class and import the method, it will work just the same.
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider