TestComplete does not recognize my external libraries.
I have followed the documentation from following link: https://support.smartbear.com/testcomplete/docs/scripting/specifics/python.html I followed step by step; to install libraries to TestComplete python interpreter to the source folder: "...SmartBear\TestComplete 15\Bin\Extensions\Python\Python313\Lib". After closing TestComplete and opening it again, the interpreter is not being refreshed; not getting the newly added libraries I installed. It keeps throwing me an error as follows: ModuleNotFoundError: No module named 'imp'. The imported library I'm trying to use is a customized file with multiple classes. However, it does also happen for win23com.client and pillow libraries. import win32com.client from PIL import ImageGrab This seems to be an error with python 3.13, but I do not find a way to downgrade the python interpreter version from TestComplete. I do not find a way to fix this even after following documentation on how to install packages, either. Would appreciate your help on this, Thanks36Views0likes1CommentRuntimeErrors after upgrading to 15.68.8.7
Hello, I recently upgraded to the latest version of TestComplete, and unfortunately, I'm experiencing issues. I'm still facing a RuntimeError originating from TestComplete's native functions (I'm using it with Python scripts). The errors occur with functions like Log.Message, Log.AppendFolder, and others. However, the problem is quite random, as it's not always the same line of code that fails. As a result, I'm unable to execute any tests at the moment and will need to downgrade to the previous version. Is anyone facing this problem as well?Solved526Views2likes16CommentsAny workaround for TC15.77 Python issue
I created ticket with Smartbear on the python issue with version 15.77, they asked us to try below steps Add the following line of code in the beginning of your script that you are running: from tc import Log, Project, Sys. It should be the first line of code. Create a System environment variable with the name "TC_SKIP_PYTHON_FINALIZATION" and set the value to 1. However this did not work for us, we are still getting "NameError: name Project is not defined". I also tried below work around but no luck. gc.collect() import gc Since we are facing chrome browser flashing issue, We cannot use 15.76 version as well. Any body has found any other workaround for the Python issue ?143Views1like5CommentsTestcomplete not executing interactive tests when triggered with TestComplete plugin .
Testcomplete is not executing interactive tests when triggered with TestComplete plugin . Testcomplete plugin version used in Jenkins job is 2.9.2 . The agent us connected to Jenkins master using JNLP for interactive execution . please help on this issue . The Testcomplete plugin invocation script is as given below: testcompletetest actionOnErrors: 'NONE', credentialsId: 'UTAAdmin_User_Pass', executorType: 'TE', executorVersion: '15.0', generateMHT: true, sessionScreenResolution: '1680x1050', suite: "${env.Pjs}", useTCService: true, timeout: '21600', useTimeout: true , useActiveSession: true Please find the log below 13:58:56 [TestComplete] The test execution started (TestAuto). 13:58:57 [TestComplete] Found TestComplete/TestExecute installations: 13:58:57 Type: TC, Version: 15.40.421.7, Path: "C:\Program Files (x86)\SmartBear\TestComplete 15\x64\bin\TestComplete.exe" 13:58:57 Type: TE, Version: 15.40.421.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 15\x64\bin\TestExecute.exe" 13:58:57 Type: TELite, Version: 15.40.421.50, Path: "C:\Program Files (x86)\SmartBear\TestExecuteLite 15\x64\bin\TestExecuteLite.exe" 13:58:57 [TestComplete] Selected TestComplete/TestExecute installation: 13:58:57 Type: TE, Version: 15.40.421.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 15\x64\bin\TestExecute.exe" 13:58:57 [TestComplete] [WARNING] The node is connected via Java Web Start (JNLP). In this mode, the "Run interactive user session" property of the TestComplete Test step is ignored. TestComplete (or TestExecute) will work in the current user session. 13:58:57 [TestComplete] Launching the test runner. 13:58:57 [TestComplete] [WARNING] Unable to publish test results (xml data is empty). [Pipeline] }70Views0likes5CommentsCtrl-Click Navigation issue to correct location of declaration\routine
I am using TC 15.76 and tried this on TC15.74 - same issue When in my automation fwk, the ability to ctrl-click on function name and taken to where it is declared is being flakey. A majority of my test scripts direct me correctly, but I have a few that direct me to the top of my test script and not to the correct location of declaration\routine. Here is a portion of how I call the test scripts in my package: // Module Testing // ---------------------- RTC538124(); - ctrl-click correctly to the declaration location of function\routine TC538453(); - issue with ctrl-click RTC538659(); - ctrl-click correctly to the declaration location of function\routine TC537950(); - ctrl-click correctly to the declaration location of function\routine Here is a portion of my test script: //USEUNIT RM_CommonFunctions (ctrl-click incorrectly takes me here) //USEUNIT RulesManagerMainWindowFunctions //USEUNIT RM_ManageUsersWndFunctions //USEUNIT RM_MainMenuFunctions //USEUNIT RM_TabFunctions //USEUNIT NEW_RM_Job_Monitor //USEUNIT NEW_RM_SearchEdits_Modules //USEUNIT NEW_RM_ModuleWorkSpace //USEUNIT RM_VersionHistoryWindow // ================================================ // Function: TC538124() - qTCID 50 // // // Edited by : // // Description: // This script performs that following steps: // // // ================================================ function TC538453() (ctrl-click should take me here) { // --- Results File Name --- var DateTimeLabel = getFileNameDateTimeLabel(); ... When I try to run a package of scripts, when executing this test script in the package, it provides the following error: Object doesn't support this property or method How can I correct this ctrl-click function issue to find the declaration\rountine correctly ? When in this test script, the routine textbox is blank when doing the ctrl-click. The dropdown for the Desired Routine area does contain the test script function name. Anyone seen this? Have a suggestion or solution to before I open a Support ticket?Solved46Views0likes3CommentsAppend/Replace Record Script Options?
There used to be options when right-clicking on a script function to either append to or replace the current script. But I don't see those anymore. Am I missing a setting somewhere, or were they removed in the most recent update (15.75)?Solved215Views0likes16CommentsFindAll returns only one (first) element
Hi guys, I'm experiencing a weird problem. I have a mapped element, from which I need to get an array of elements. If tested in chrome/edge dev mode, the xpath of mapped element happily returns number of elements. But FindAll returns only one (first) element. Here is the code I'm using: function CompareElementsWithRefJSON(createNewRefFiles, setElementFlag, headerInputs, tabInputs, autocompleteMenu, selectPopUpMenu, tabsData, filePath) { let headerItems = headerInputs.FindAll('type','*',5000); headerItems = headerItems.toArray(); ... } I have a workaround, using FindElements, which works OK, but I don't like it, because it's unnecessary complicated: function CompareElementsWithRefJSON(createNewRefFiles, setElementFlag, headerInputs, tabInputs, autocompleteMenu, selectPopUpMenu, tabsData, filePath) { let formInputsXpath = GetXpathFromAlias(headerInputs); // This returns xpath of mapped alias object let headerParent = headerInputs.Parent; // Get parent element let headerItems = headerParent.FindElements(formInputsXpath); // Returns array of elements. Works OK. ... } So, any idea why FindAll returns just one element? BTW, it does not matter what PropName I use as the first parameter. The result is the same. Always just one element.224Views0likes19CommentsIs there any way to get code completion to function when using classes?
Hi all, I'm working a little with classes inside of TC, and have have been rubbing up against an issue with code completion (intellisense) not working. If I have the two blocks of code in different .js files; class foo { constructor(panel) { this.panel = panel; } } function LogMessage(){ Log.Message(`This Is a Logged Message from the parent class`) } module.exports = {Foo: Foo} const foo = require("Foo"); class Bar extends Foo.Foo{ constructor(panel){ super(panel); } } function secondClassFunction(){ Log.Message(`This is the child class`) } module.exports = {Bar:Bar} And then in a third .js file, have another code block calling the 'Bar' class like the following var Bar= require("Bar"); function FunctionName(){ const x = new Bar.Bar(`panel`); } Typing 'x.' won't generate any intellisense prompts to appear. Has anyone seen this before \ is there a solution \ work around? I understand there might be a few different ways to implement inheritance (which is my ultimate goal, since Bar is a child of Foo), so if anyone has any suggestions for rewriting this that might help, the feedback would be appreciated. Thanks, DanSolved111Views0likes5CommentsJUnit Export Does Not Include Execution Time and Warnings in XML File
When using the method Log.SaveResultsAs(Project.Variables.FileLog, lsJUnit), the generated XML file does not include critical information shown in the TestComplete summary, such as the total execution time and the number of warnings.45Views0likes1CommentgetGlobal returned NULL error after upgrade
Using OCR capability provided via Intelligent Quality add-on to test a LabView application. TestComplete python scripts were working fine on TestComplete ver. 15.69. Upgraded to ver. 15.73 and am now intermittently hitting the following error: Run test script 1 - this automatically invokes application and script is run successfully. Application is left running. Run test script 2 - script begins but then immediately hits "Python runtime error. SystemError: <built-in function getGlobal> returned NULL without setting an exception. The error occurs on a simple variable assignment (e.g., "map_sel_pref": spNone) within a python dictionary. The problem appears to be in identifying the spNone (which is one of the SelectionPreference constants associated with the OCR BlockByText() method). If I shut down the application and then re-run test script 2, the test script will invoke the application and test script 2 will be successful. This does not happen consistently -- there are cases where steps 1 and 2 above run fine without error. In cases where I hit the error, I can successfully access the NameMapping objects -- that is, TestComplete can identify the application after test script 1 completes and the application is left running. Since the SelectionPreference parameter is simply an integer, I could change my code from "map_sel_pref": spNone to something like "map_sel_pref": -1 if I knew the constant values, but I don't believe that is documented anywhere. More importantly, not sure why this has become a problem with the latest update. Any suggestions on fixing/resolving this?57Views0likes1Comment