SmartBear Test Extension manual installation
I want to setup Test complete on our Azure cloud machine, since it do not have internet access i followed the steps in the below link to install SmartBear Test Extension manually https://support.smartbear.com/testcomplete/docs/app-testing/web/general/preparing-browsers/chrome-extension.html?sbsearch=edge%20browser%20extension Issue i am facing is Edge and chrome browser SmartBear Test Extension is getting installed only for my user id and if i login using Test account, the Smart bear extensions are not available. Anyone else faced similar issue? I am not sure if i am missing something when manually adding the SmartBear Test Extension.90Views0likes3Commentschanging dropdown menu field for every testing
Hi Guys, what I want the system to do: I will check a field, it is a dropdown menu, and if this field is for example A, I should select another option for example B for this field from the dropdown list. Or if this field is B I should change it to A so how can I do it with scripting? Do you have an idea? I could have not found the correct codes for this:( For example in one test the field contains A and you should change it to B, than for the next time the field is B and you should change it to A.364Views0likes1Commentcheck points for changeable values
Hey Guys, I have a question about property checks. During my testing I want to check the date which is always changing from day to day or the name of my document which is also changing according to the date. So which kind of property check I can use for? Or how can I manage it with phyton scripts? Could you pls help me?Solved226Views0likes3CommentsUndefined folder created
It creates an undefined folder only. Inside Undefined we got Manual and inside Manual we got time stamp. The main problem is the first folder Undefined. Could anyone please help me? function Test() { var currentDateAndTime = aqDateTime.Now(); var currentTime = aqDateTime.Time(); var currentDate = aqDateTime.Today(); var projectName = ProjectSuite.Variables.projectName; var testtype = ProjectSuite.Variables.testtype; var timestamp = aqDateTime.Now(); //currentDate + currentTime; if(testtype == "Manual") { ProjectSuite.Variables.buildnumber = aqConvert.DateTimeToFormatStr(timestamp, "%m%d%Y_%H%M%S"); } var folderPath = "E:\\Results\\" + projectName + "\\" + testtype +"\\" + ProjectSuite.Variables.buildnumber + "\\"; //var folderPath = Project.Variables.resultpath; // Check if the folder already exists //if (!aqFileSystem.Exists(folderPath)) { // Create the folder //if (aqFileSystem.CreateFolder(folderPath)) { // Log.Message("Folder created successfully: " + folderPath); // } else { //Log.Error("Failed to create folder: " + folderPath); // } //} else { // Log.Warning("Folder already exists: " + folderPath); //} aqFileSystem.CreateFolder(folderPath); //folderPath = folderPath + "\\" Log.SaveResultsAs(folderPath, lsXML, true, 1); // Files are created in the Project1 folder }Solved253Views0likes5CommentsChrome driver not working with TestComplete
TestComplete is not downloading the Chrome driver automatically so I put the webdriver manually inC:\ProgramData\SmartBear\WebDrivers\chrome and I am getting this error: TestComplete failed to download the needed WebDriver. You can download the chrome driver manually and put it in the <ProgramData>\SmartBear\WebDrivers\chrome folder. My TC version is latest:15.56.2.7 x64 My Chrome web browser version is:117.0.5938.132 (64-bit) But I am trying to launch Chrome headless via: function launchHeadlessBrowser() { var server = "localhost"; var capabilities = { "browserName": "chrome", "screenResolution": "1920x1080" }; Browsers.RemoteItem(server, capabilities).Run(Project.Variables.url); }Solved607Views0likes6CommentsTesting with text files
Hi, i was wondering if anyone has tried testing with log files. im creating a test that looks over text files and put a parameter if the logfile is less than or greater than the value put. this is the code i have so far but it keeps giving me an error with the script im making. Any thoughts or ideas on how i can make this happen? import sys import os import aq def read_text_file_and_test(file_path): try: with open(file_path, 'r') as file: if __name__ == "__main__": if len(sys.argv) != 2: print("Usage: python test_script.py <path_to_text_file>") sys.exit(1) text_file_path = sys.argv[1] if not os.path.isfile(text_file_path): print("The provided file does not exist.") sys.exit(1) read_text_file_and_test(text_file_path)415Views0likes6Commentspsycopg2 failes when used from TestComplete but not when from TCs Python directly
There is a Python script that reads from Postgres db. Notice that I am running it with the TestComplete's own Python. Where the psycopg2 library was added by me. ``` /c/Program\ Files\ \(x86\)/SmartBear/TestComplete\ 15/x64/Bin/Extensions/Python/Python310/python.exe pg_utils.py ``` It has couple of prints that reveals sys.prefix and sys.path ``` sys.prefix: C:\Program Files (x86)\SmartBear\TestComplete 15\x64\Bin\Extensions\Python\Python310 sys.path: [ 'C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310\\Lib\\site-packages', 'C:\\Tests\\TestComplete\\lib\\postgres', C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310\\python310.zip', 'C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310\\DLLs', 'C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310\\lib', 'C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310', 'C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310\\lib\\site-packages', 'C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310\\lib\\site-packages\\tzdata-2023.3-py3.10.egg', 'C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310\\lib\\site-packages\\typing_extensions-4.8.0-py3.10.egg' ``` And script works fine Connecting to the PostgreSQL database... ['postgres', ...] BUT: When I try to run it from TestComplete's UI I got the following output: ``` sys.prefix: C:\Program Files (x86)\SmartBear\TestComplete 15\x64\Bin\Extensions\Python\Python310 sys.path: [ 'C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310\\Lib\\site-packages', 'C:\\Tests\\TestComplete\\lib\\postgres', 'C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310\\python310.zip', 'C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310\\DLLs', 'C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310\\lib', 'C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310', 'C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310\\lib\\site-packages', 'C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310\\lib\\site-packages\\tzdata-2023.3-py3.10.egg', 'C:\\Program Files (x86)\\SmartBear\\TestComplete 15\\x64\\Bin\\Extensions\\Python\\Python310\\lib\\site-packages\\typing_extensions-4.8.0-py3.10.egg' ] ImportError: cannot import name 'encodings' from 'psycopg2._psycopg' (C:\Program Files (x86)\SmartBear\TestComplete 15\x64\Bin\Extensions\Python\Python310\Lib\site-packages\psycopg2\_psycopg.cp310-win_amd64.pyd) ``` sys.prefix is obviously the same and I have manually copied sys.path to be exactly the same as if I run it directly from Python. Question: Why it can't import something if it is using same Python.exe and has same sys.path. Is TestComplete forcing script to use some other path, and how can I Debug it. Thank you! UPDATE: It turns out that the error doesn't pop up if I restart TestComplete and run my test for the first time. If I run something else beforehand or if I try to rerun the test - script produces the error. I found similar issue [here](https://community.smartbear.com/t5/TestComplete-Questions/Python-fail-to-import-lib-during-the-second-attempt-to-run/td-p/153683) it was not solved but win32com was pointed to be the root cause. I am importing psycopg2 and using x64 Python. Can I be affected by the same issue. Any meaningful ideas how to figure it out are welcome354Views0likes6CommentsVLC screen recorder - missing beginning
Hi, I was happy to find TC extension for screen recording based on VLC and somehow it works but.... When test is longer than let's say 1minute, initial 24 seconds of the video are missing. I tried with different codecs (other than h624) but quality is so poor. The same happens when I start recording from PowerShell level in test queue based on my on commandline VLC operation. Anybody had same problems, any solution ? VLC 3.0.17.4587Views0likes3Comments