Contributions
Re: Cannot access current test name in script
Hello Sorry but your response is very unclear Please can you explain exactly how to do this, or send a working example? Please see the screenshot attached As you can see, the test is already part of the project When we debug, Project.TestItems.Count is 121 which is correct, but CurrentItem is null Our tests2.7KViews0likes2CommentsCannot access current test name in script
We have the method below which is trying to log the name of the test currently being executed function Test() { var TestItems; TestItems = Project.TestItems; Log.Message("The " + TestItems.Current.Name + " test item is currently running."); } This is being run in TestSetup This is just resulting in a very unhelpful JScript error Object required Stepping through, it appears as though Project.TestItems is assigned, but not Current Has anyone ever had this problem? We are using TestComplete using JScript as the scripting language Project.TestItems is the object that Test Complete says to use to get information about the Project being run. As I mention above, there is information about the Project and Project.TestItems but TestItems.Current is null Its as if I am calling this too early but I cant see where else to call it. It is being called in TestSetup Paul2.7KViews0likes4CommentsCan TestComplete be used with DevExpress XtraReports?
Hello I have a horrible feeling that the answer to this is going to be no, but we have written a lot of reports in DevExpress using their report suite. Is there any way to test these reports in TestComplete? I.e. using the finder tool to go to specific sections of the report? Cheers Paul9.6KViews0likes1CommentRe: How do I catch if an unexpected error has occurred?
Hello This still does not work Can you please show me an example that works? I am doing something that should be very simple function TestException() TestException() { //Runs the "test" tested application. TestedApps.test.Run(); //Clicks at point (181, 15) of the 'Form1' object. Aliases.test.Form1.Click(181, 15); try { //Clicks the 'button1' button. Aliases.test.Form1.button1.PerformClick(); } catch (e) { Log["Error"](e["description"]) ************Does not get here } //Clicks the 'button1' button. Aliases.test.Form1.button1.ClickButton(); //Runs the "test" tested application. TestedApps.test.Run(); //Checks whether the 'Text' property of the Aliases.test.Form1.button1 object equals 'Test'. aqObject.CheckProperty(Aliases.test.Form1.button1, "Text", 0, "Test", false); //Runs the "test" tested application. TestedApps.test.Run(); //Closes the 'Form1' window. Aliases.test.Form1.Close(); } Paul971Views0likes0Comments