Contributions
Convert TC object type to VS object type
Hi! How can I convert the object from the environment TestComplete to the object in the environment VisualStudio? I connect the function of the assembly written in C # in which the input parameter must be an object. In it I want to convert this object to the type used in C #. How do I do?9.1KViews0likes1CommentRe: Alternative for TestRecorder. Does it exist?
I would also like to search ("findchild" and others) child objects can be done using the logical "OR". For example that I can find and "button" and "text box indicating the two classes in the search parameters. An example of course is not quite correct, but I hope you understand me.1.2KViews0likes0CommentsRe: Alternative for TestRecorder. Does it exist?
Hi Allen I'll try to explain in more detail in the form of a sequence of desired actions: 1) Run TestRecorder from my application 2) Save it to file (not creating a project, or the ability to insert it into an existing project) 3) In the same application run it using TestExecuter1.2KViews0likes0CommentsRe: Calling Script Routines via COM
I used the example described in TestComplete Help in article "Calling Script Routines via COM" 1) I wrote a script in the environment of TestComplete 2) Then I Run the script from TestComplete, it completed for one minute 3) Then I run the same script from the code in C # (likewise in the example described in the help), script was completed more than 2 minutes Why it takes longer? Is it possible to somehow speed up this process? example described in the help: const string TCProgID = "TestComplete.TestCompleteApplication"; object TestCompleteObject = null; // Initialize variables string sProjectFileName = "C:\\Work\\MyProject\\MyProjectSuite.pjs"; string sProjectName = "TestProject"; string sUnitName = "Unit1"; string sRoutineName = "MyRoutine"; // Obtain access to TestComplete try { TestCompleteObject = Marshal.GetActiveObject(TCProgID); } catch { try { TestCompleteObject = Activator.CreateInstance(Type.GetTypeFromProgID(TCProgID)); } catch { } } if (TestCompleteObject == null) return; // Obtain the ITestCompleteCOMManager object TestComplete.ITestCompleteCOMManager TestCompleteManager = (TestComplete.ITestCompleteCOMManager) TestCompleteObject; // Obtain the Integration object TestComplete.ItcIntegration IntegrationObject = TestCompleteManager.Integration; // We have a reference to the Integration object. // Now we can use its methods and properties to automate TestComplete. // Load the project IntegrationObject.OpenProjectSuite(sProjectFileName); if (!IntegrationObject.IsProjectSuiteOpened()) { System.Windows.Forms.MessageBox.Show("The project suite was not opened."); return; } // Save data to a temporary file System.IO.StreamWriter MyFile = new System.IO.StreamWriter("C:\\TempFile.txt"); MyFile.WriteLine("John Smith,johnsmith@johnsmithscompany.com,05/05/2009,0000-1234-5678-9000"); MyFile.Close(); try { // Run the routine IntegrationObject.RunRoutine(sProjectName, sUnitName, sRoutineName); // Wait until the test run is over while (IntegrationObject.IsRunning()) Application.DoEvents(); // Check the results if (IntegrationObject.RoutineResult != null) System.Windows.Forms.MessageBox.Show("Script routine returned " + IntegrationObject.RoutineResult.ToString()); else System.Windows.Forms.MessageBox.Show("Script routine did not return any result"); ItcIntegrationResultDescription LastResult = IntegrationObject.GetLastResultDescription(); switch (LastResult.Status) { case TestComplete.TC_LOG_STATUS.lsOk: System.Windows.Forms.MessageBox.Show("The test run finished successfully."); break; case TestComplete.TC_LOG_STATUS.lsWarning: System.Windows.Forms.MessageBox.Show("Warning messages were posted to the test log."); break; case TestComplete.TC_LOG_STATUS.lsError: System.Windows.Forms.MessageBox.Show("Error messages were posted to the test log."); break; } } catch (System.Runtime.InteropServices.COMException ex) { System.Windows.Forms.MessageBox.Show("An exception occurred: " + ex.Message); } finally { // Close TestComplete TestCompleteManager.Quit(); // Release COM objects Marshal.ReleaseComObject(IntegrationObject); Marshal.ReleaseComObject(TestCompleteManager); Marshal.ReleaseComObject(TestCompleteObject); }1.8KViews0likes0CommentsRe: Calling Script Routines via COM
I mean all time from the project opening before the end of its execution. I just run a TestComplete test from the application (VIA COM) with method RunRoutine(ProjectName, UnitName, RoutineName). From the code TestComplete project runs more slowly in 2 times.1.8KViews0likes0Comments- 1.2KViews0likes0Comments