Contributions
OpenTextFile too slow or hangs
Hi, I amevaluating TestComplete 7.51. I am using the proc below to access the Logfile of the application that I am testing. The logfile can be tens of lines long. I find that if it is more than a few lines long, TestComplete hangs. I cannot even stop the test and I need to kill the process. I am attaching a simle text file that fails to read. If I only use lines up to "t" then it works fine. Being able to analyse the text in the LogFile is very important for our QA. Kind regards Tina function readTotalTime() { readTotalTime(){ var logfile; var nolines, s, l; logfile = aqFile.OpenTextFile("C:\\test2",aqFile.faRead, aqFile.ctANSI); logfile.Cursor = 0; Log.Message("Opened file"); nolines = logfile.LinesCount; Log.Message("There are " + nolines + " lines in LOGFILE"); l = nolines - 2; logfile.SetPosition(l, 0); s = logfile.ReadLine(); Log.Message("Read from line " + l); Log.Message(s); logfile.Close(); }11KViews0likes1CommentClick() fails on a button accessed through getAccessibleChild()
Hi, I am evaluating TestComplete 7.51, and am writing a JScript that will install my application using InstallShield. I want to run the InstallShield and then click on the "Next" button. Our build server builds the application in a different folder (according to date) every day, so I don't think that I can add the InstallShield to the TestedApps. In my test, I start InstallShield using the windows explorer and get the InstallShield window with javaw = Sys.WaitProcess("javaw", 600000); In the InstallShield main window there is a panel with 3 buttons "Cancel" "Previous" and "Next". I get the panel using PropArray = new Array("JavaClassName", "Visible"); ValuesArray = new Array("ZeroGf9", true); ConvertedPropArray = ConvertJScriptArray(PropArray); ConvertedValuesArray = ConvertJScriptArray(ValuesArray); mainpanel= javaw.FindChild(ConvertedPropArray, ConvertedValuesArray, 8); Then I find the "Next" button thus: childno = mainpanel.getAccessibleChildrenCount; for ( i = 0 ; i < childno ; i ++ ) { nextbtn1 = mainpanel.getAccessibleChild( i ) ; if ( nextbtn1.text.equals("Next") ) break; } Then I want to click the "Next" button, so I do: nextbtn1.Click(); but this gives me a Microsoft JScript runtime error: Object doesn't support this property or method I don't understand why. If instead I access the "Next" button through Aliases for a particular instance of InstallShield,like this: Aliases.javaw.frame0.RootPane.null_layeredPane.null_contentPane.ZeroGge.ZeroGf9.ZeroGgb1.Click(); then I can use it. But I don't think that I can use Aliases with an application which is not in the TestedApps and in any case the button names are created dynamically, so they are different every time. What am I doing wrong? Best Regards Tina9.9KViews0likes2Comments