ContributionsMost RecentMost LikesSolutionsRe: User scope in TestComplete Thanks Helen, that solves my issue! User scope in TestComplete I call shell to run command in TestComplete: function RunCommand(cmd, intWindowStyle, waitOnReturn) { var shell = new ActiveXObject("WScript.Shell"); if (intWindowStyle != null){ shell.Run(cmd, intWindowStyle, waitOnReturn || false); } else { shell.Run(cmd); } } Simply i list files and directories in C:\Windows\System32: RunCommand("cmd /C \"dir C:\\Windows\\System32 > C:\\test.log\""); From log file C:\test.log, i get files and dirs: 2224 File(s) 941,726,810 bytes 80 Dir(s) 2,868,465,664 bytes free But if run the command directly in command line window, i get different results: 2635 File(s) 1,222,264,966 bytes 88 Dir(s) 2,868,346,880 bytes free You can see 400+ files and 8 directories less in TestComplete result. I thought TestComplete was running the command in a different account, but when i ran below command in TestComplete, it said it was running as administrator: RunCommand("cmd /C \"whoami /user > C:\\user.log\""); /*** Output in C:\user.log ***/ USER INFORMATION ---------------- User Name SID ======================= =========================================== oyin-win7\administrator S-1-5-21-2771899511-80630353-1606088258-500 Can someone tell me what's going on here? Thanks in advance! Ocean SolvedIs it test complete itself cause tested application to crash? Hi, Randomly i get tested application crashed at installation stage during our automation - "The xxx.exe process crashed.". However, we never run into such process crash situation during manual installation. Once a time i got one error message in system event log when it said my tested application process crashed: Error 15/03/2016 4:54:14 PM 1000 Application Error Faulting application name: WriteProfessionalEditionsTDPTrialKey.exe, version: 1.0.0.0, time stamp: 0x56e7aaae Faulting module name: tcMSAAAppHook.dll_unloaded, version: 0.0.0.0, time stamp: 0x5473624c Exception code: 0xc0000005 Fault offset: 0x000000001da0dcb7 Faulting process id: 0xc30 Faulting application start time: 0x01d17e9837f39073 Faulting application path: C:\ProgramData\Package Cache\BC6A34D9BBA18EC97E537E4D92B69706818C8E71\WriteProfessionalEditionsTDPTrialKey.exe Faulting module path: tcMSAAAppHook.dll Report Id: 7da35591-ea8b-11e5-acfc-0050562dafaf Apparently the faulting module tcMSAAAppHook.dll is one from TestCompelete, and it caused my test application to fail. In most other cases i can't get any error info from system event logs when it says my tested application process crashed. I think it's likely that test complete is injecting something into the tested application which cause the application to fail. I have to rerun tests everytime i get "The xxx.exe process crashed" at installation stage in automation, which is quite frustrating. Are there any settings that will NOT allow to inject extra assemblies into tested application? And i'm not sure whether it's really an issue in our application, or it's an issue relates to TestComplete. Thanks, Ocean Re: FindAllChildren I don't think VBArray is supported in C# applications: Test complete script engine uses the Variant-array format that is not adopted in C#. So, to convert these values, you will have to call the UnWrap method of the var object. The following code demonstrates how you can call the FindAllChildren method from a C# Connected Application: void FindProcessMultiple() { // Creates arrays of properties and values String[] PropArray = new String[2]; String[] ValuesArray = new String[2]; // Specifies property names PropArray[0] = "ProcessName"; PropArray[1] = "UserName"; // Specifies the property values ValuesArray[0] = "*"; ValuesArray[1] = Connect.Sys["UserName"]; // Searches for the process var p = Connect.Sys; var res = p["FindAllChildren"](new var(PropArray), new var(ValuesArray), 1); // Posts the search results if (Connect.BuiltIn["VarArrayHighBound"](res, 1) >= 0) { object[] ManagedArray = (object[])res.UnWrap(); for (int i = 0; i < ManagedArray.Length; i++) { var ArrayEntry = new var(ManagedArray); Connect.Log["Message"]("Found: " + ArrayEntry["ProcessName"].UnWrap()); } } else Connect.Log["Message"]("Not found"); } Re: Time limitation for selenium tests in TestComplete? Seems no one has met such issue as i do. I'll change to call python tests from command line instead. Time limitation for selenium tests in TestComplete? Hi there, I've configured to run selenium test suite (python script) in TestComplete. At first everything went well, but after adding more and more tests into the suite, i'm encounting a strange issue and still have no idea what's going on: When selenium tests run more than 1 hour, selenium tests will terminate all of a suddent. I could not get any useful message from python or TestComplete part. I'm wondering if there is a place in TestComplete to control running time for selenium tests? NOTE: Timeout value for selenium test item is set to 0 Thanks, Ocean Window Object, Java Object? Hi, There is a popup dialog, for a control on the dialog, i expect its fullname is Sys.Process("adminconsole").SWTObject("Shell", "Authentication").SWTObject("Composite", ""), but sometimes i get the fullname during test run, which will lead test to fail: Sys.Process("adminconsole").SWTObject("Shell", "Authentication").Window("SWT_Window0", "", 1),the control is not recognized as Java object. Is there a way to resolve such control recognition issue? Thanks, Ocean Re: Getting ribbon item via Items.Item() failsI can see property wItems for RibbonBar, usually it's under Advanced view -> Extended -> wItems. -OceanRe: Getting ribbon item via Items.Item() failsThat's normal, which means only int is accepted for Item(...), you can see from the description of your capture. And that's why you get mismatch type from your code. There are some samples in the URL you pasted, you can try to get item from wItems: Sys.Process("MyRibbonApp").WinFormsObject("frmMain").WinFormsObject("ribbonControl").wItems.Item("QuickAccessToolbar").Items.Item("Paint style"); -OceanRe: How to know if Status bar is active or still workingIn your code, you saved value of StatusBar.wPartCount into a local variable StatusBarPane, and then output that saved value again and again in while loop. If you want to get latest wPartCount in while loop, you should output StatusBar.wPartCount instead of StatusBarPane. -Ocean