problem with dotNet.System_IO.File.WriteAllText
Hi folks, I'm using methoddotNet.System_IO.File.WriteAllText to write some data to CSV. The thing is it started to fail with below JavaScript error... It definitely worked before. But I'm not quite sure, when it started to fail, because it's in a part of code, which is used only occasionally (to create new ref. data). Of course, I'm aware that I can use aqFile.WriteToTextFile function. But it creates a file with BOM, which I need to avoid. Therefore, I was using above dotNet method (as suggested here). Any idea what's wrong with my code? Thanks.36Views1like2CommentsLog.SaveResultsAs() Unable to export the summary
Hi, I've been using the Log.SaveResultsAs() method to assist in creating summary htm files to be emailed out showing if our scheduled test runs have passed / failed. I've had no issue previously doing so, the tests had been running for several weeks with no issue until today. My project creates a new folder for logs to be stored in, runs any scripts as desired, then saves the results (Using Log.SaveResultsAs()) into the created folder, then emails out a summary report of the scheduled run test summary. When I run my scripts now, when the Log.SaveResultsAs() code is hit (I did code stepthrough to check this is the point the error is triggered), I get the below error. Nothing has changed in my environment setup - the only difference is today we updated TestComplete to the latest version. I did some snooping on the TC Documentation to check if the method has changed, but as far as I saw it shouldn't be any different? Despite what the error above states, files are created when the Log.SaveResultsAs() code is hit, and the subsequent code I have does allow the email to be sent with a summary.htm attachement, but the TestComplete error is causing my tests to freeze until the error is dealt with. Below is the code I am using (Using Python!) - I would normally have the following as my execution plan - Create New Log folder My project test scripts Save results and then email summary Below is the Create New Log folder code Below is the Save results and email summary code (Some details are censored for obvious reasons) Any advice on how to resolve this would be much appreciated. Jacob.Solved238Views0likes10CommentsDBTableVariableObj.Reset() not working as expected
Hi guys, I'm experiencing a weird problem with DBTableVariableObj.Reset(), which is supposed to reset the iterator back to the first row. Well, it seems it does not reset the iterator at all :) Here is a simple function to demonstrate the issue... //dbTableToRead is a DB Table variable diefined in keyword test //columnToRead is a name of column function testDBTableReset(dbTableToRead, columnToRead) { var targetWord, i=1; // Obtains a DB Table variable var dbTable = dbTableToRead; // Initializes the iterator dbTable.Reset; Log.Message("Iteration - Start"); // Iterate through rows while(!dbTable.IsEOF()) { targetWord = dbTable.Value(columnToRead); Log.Message("Row number: " + i.toString() + " Value: " + targetWord); // Forward the iterator to the next row dbTable.Next(); i++ } Log.Message("Iteration - End"); } Basically, it should iterate over the items in DB Table variable and write them to log. I'm calling this function two times in the same keyword test... And here is the result: Basically, the second run of the function jumps over the while(!dbTable.IsEOF()) block, as if the dbTable is not reset? But it should be or am I doing something wrong? It seems it's not possible to attach the sample project here, so if you are interested, you can get it here (zipped and inspected for viruses): https://drive.google.com/file/d/1TiRh50vKP6mguNRgvT13-vnyL-eP8rp1/view?usp=sharing Thank you in advance for any suggestion.Solved53Views0likes6CommentsHighlight execution point Tabs
Hello! Is there any way to keep the "Highlight execution point" option on, but without having so many tabs open? Like show the actual execution point on the current scrypt and when it passes to the next execution point close the previus tab or something? I know there is an option that you can choose how many tabs you want to have at the same time, keeping that number low closes the first tab opened, including the execution plan one and so, its kinda uncomfortable.Solved17Views0likes1CommentGetting an on-premise license for TestExecute is always slow, and sometimes fails
Hi, Recently we have moved from getting licenses from a HASP-license server to the new SmartBear Licensing Management (SLM) solution. We have upgraded our TestComplete/TestExecute installations to 15.55 and setup an on-premise license server that server licenses to the clients. All clients have been setup with the URL for the SLM-license server. We experience that getting a license from the SLM-server takes much longer than with the previous HASP-solution. Sometimes the license acquisition fails, with the message: "The user did not log in using the SmartBear account or did not pass the accesskey in the command-line arguments. TestComplete will be closed.The user did not log in using the SmartBear account or did not pass the accesskey in the command-line arguments. TestComplete will be closed." What can I do to ensure that our licenses are served efficiently and reliably to our TestExecute-clients?199Views0likes1CommentObject detected locally but comes back as "Object not found" in Jenkins
Hey all, So I have an issue where an list object is not detectable inside Jenkins but it passes just fine in my local environment and I am not sure why that might be happening. So I have this code: try { var dialogDownload = Aliases.browser.FindChildEx( ["ObjectType", "Caption"], ["Dialog", "Downloads"], 10, true, 20000 ); if (dialogDownload.Exists) { Log.Message("Dialog found successfully."); Sys.HighlightObject(dialogDownload); } else { Log.Warning("Dialog not found."); } } catch (e) { Log.Error("An error occurred: " + e.message); } This finds the appropriate object, which is this in the object window: Now, I'm trying to drill in and find the "List" object, which has this code: try { var intermediateObject = dialogDownload.FindChild("ObjectType", "Pane", 20); var list = intermediateObject.FindChildEx( ["ObjectType", "Caption"], ["List", "Recent downloads"], 20, true, 20000 ); if (list.Exists) { Log.Message("List found successfully."); Sys.HighlightObject(list); } else { Log.Warning("List not found."); } } catch (e) { Log.Error("An error occurred while trying to find the list: " + e.message); } It is located in the following object window: Locally, it finds the object just fine, but when I run it in Jenkins, it says "Object not found" on the List. Is there another approach that I might be able to take?201Views0likes4CommentsHaving issues while fetching the data from console
I updated to the latest TestComplete version, 15.58.9.7 x64, and have been experiencing issues while trying to fetch the object from the console. Please review the code snippet below, which is used to fetch the objects. It was working fine before the latest update, but now it returns a value of 'undefined.' Could you please suggest any ideas for what might be causing these issues? varpageObj =Sys.Browser().Page("*"); var productID = pageObj.contentDocument.Script.eval("app.variableMap.productId"); The screenshot below displays the data I am attempting to retrieve using the code above,Solved241Views0likes3CommentsChrome 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); }Solved592Views0likes6CommentsTypeError: Sys.WaitBrowser is not a function - Caused by DIsabled Extension
I had something odd happen, and I was able to resolve it, but I am not sure why it occurred. So, I thought I would share it with others who may run across the same issue, since I was not able to find any information in the forums. I restarted my computer, after fully closing out of TestComplete. After I opening TestComplete and my Project file, when I ran a test I had run earlier I got a "TypeError: Sys.WaitBrowser is not a function" dialog as shown here: This particular function has not been changed in years, so it was puzzling why it suddenly stopped working and would not identify my open browser window. Turns out, somehow in the restart of TestComplete or my computer that the Web Module was disabled. After an hour of wasted time, I finally figured out that was the issue. To resolve, go to File --> Install Extensions --> Enable the Web module... This occurred in Version:15.49.6.7 x64641Views4likes2Comments