Forum Discussion
(Continued as the Community post Editor kept failing to publish my word dump)
Another of my mistake was downgrading to the wrong version of Python 3.11
i had just done an install using Chocolatey for 3.11 however that has installed v3.11.6. and TestComplete currently only supports 3.11.5...great. so as as 09/01/2024, use 3.11.5 as per current documentation, for TestComplete v15.59 i have put my verson of python to 3.11.5
https://support.smartbear.com/testcomplete/docs/scripting/specifics/python.html?
after installing the right compatible version of python for TestComplete i then installed the package using pip
copied all the folders across from the packages in python to TestComplete
so i FINALLY got the module to work in my code. it ran nicely for the first time i ran the TestComplete program with the script
def SfLogin():
username = Project.Variables.sfusername
password = Project.Variables.sfpassword
token = Project.Variables.sftoken
sf = simple_salesforce.Salesforce(username=username, password=password, security_token=token, domain='test')
session_id, instance = simple_salesforce.SalesforceLogin(
username=username,
password=password,
security_token=token,
domain='test')
Browsers.Item[btEdge].Navigate(f"{instance}/secur/frontdoor.jsp?sid={session_id}")
Browsers.Item[btEdge].Navigate(f"{instance}/lightning/r/Contact/003Bo00000GPAFtIAP/view")
Delay(7000)
all dandy.. I felt powerful.. I can now trial out more fancy function, HOWEVER, on trying to run it a second time, i get the following error
Python runtime error.
SystemError: initialization of md__mypyc did not return an extension module
only after closing and reopening TestComplete, does it work again. And only for the first run. the second run onwards will fail...soooo I dont know what to do now. TestComplete doesn't seem to be able to run the Test as expected on subsequent run and I have run out of days on my TestComplete trial to spend any more effort to figure out any ways to fix this up.
please also note that i have also trialed and downloaded and installed the testcomplete salesforce extension,
https://github.com/SmartBear/testcomplete-salesforce-extension
however this a very basic salesforce api implementation and has not been updated for over 3 years and hence i would prefer to use a more current module