Forum Discussion

witte's avatar
witte
Occasional Contributor
14 years ago

Problems with events click or clickButton

Hi everybody,



hope anyone can help me, because I'm very despaired about my code stops with errors since 2 days though I don't change something.



Here is my short problem description:

I develope testcases in C# Script for a delphi application with Testcomplete 8.10 at Windows XP. All tests were running successfully, but since a short time the test aborts with some error messages like:



1) "The window does not respond

2) "Access violation at address 17B4EC54 in module 'tcthirdpartycontrols.pls'. Read of address 00000000"



I'm sure that the objects are existing in objectree. I've also tested it with logging a message and the state "Exists" was true at every time.

I'm really helpless which reason it could it be, I've no changes in my code. The one I remember was a Windows Update (Win XP).



Has anyone a problem like this???



example for message 1)

=> occures when clicking a tab or something like this


/*activate page (modul)*/

function selectPage(tabname, registername){


    var
extPageControl;

    extPageControl = Aliases["DBSWIN"]["DbsMainForm"]["ExtPageControl"];

    extPageControl[registername]["Click"]();

}



Additional information:

The window with the 0x00150512 handle exists but did not respond during the auto-wait timeout (5000 ms).

Try increasing the 'Auto-wait timeout' project property.

Sys["Process"]("DBSWIN")["VCLObject"]("PatientListForm")["VCLObject"]("Panel1")["VCLObject"]("OkBtn")





=> Changing the auto wait time was not the reason, I've tried this suggestion.




example for message 2)

=> occures when clicking a Button


//click ok btn in patientlist

function clickOKBtn(){

    var patientListForm, btn;

    try{

        //BuiltIn["Delay"](800);

        patientListForm = Aliases["DBSWIN"]["PatientListForm"];

        btn = patientListForm["FindChild"]("ObjectIdentifier", "OkBtn", 10);

        Log["Message"](btn["Exists"]);

        btn["ClickButton"]();

    }catch(e){

        Log["error"](e["description"]);

    }

}




Best regards,

Stephanie Witte


6 Replies

  • Hello Stephanie,


    To help us investigate the problem, please follow the steps below:


    1. Download AQtime Standard from our web site.


    2. Install the tool.


    3. Start AQtime.


    4. Select the 'File | New Project From Module...' main menu item.


    5. In the Open File dialog, select the executable file of the tested application and click Open.


    6. Take a look at the AQtime toolbar - there is a combo box. Open it and select the "Tracing | Exception Trace Profiler" item.


    7. Select the "Options | Options..." main menu command - the Options dialog will appear.


    8. Enable the "Profiling Time | Event View | Debug Events | Generate dump on exception" option and specify a dump folder.


    9. Set the "Profiling Time | Event View | General | Exceptions | Depth shown" setting to 100 and click OK.


    10. Click the Run toolbar button (the green arrow) or press F5 to start profiling.


    11. AQtime will start the tested application and generate dump files for all the exceptions that will occur in the application until it is closed.


    12. Run your test to reproduce the two problems or at least the problem with the access violation exception.


    13. After the problem occurs, right-click somewhere within the Event View panel (it is opened by default at the bottom of AQtime's window) and select the 'Save All...' item.


    14. Save the panel's contents to an HTML file and send us the file along with all of the generated dump files via our Contact Support web form.


    Thanks in advance.


    BTW, you can also install the latest version of TestComplete, which is 8.20.

  • witte's avatar
    witte
    Occasional Contributor
    Hi,



    thanks a lot  for your answer.

    Sent the files by Contact Support web form. Hope it may help you to find out my problem.





    best regards,

    Stephanie Witte
  • Hi Stephanie,


    I could not find your message in our database. Did you click the Submit button on the form?



  • witte's avatar
    witte
    Occasional Contributor
    I've found out now, that it happens only by using the clickButton() method. I replaced ClickButton with Click and DoDefaultAction method and both are working fine. As soon as I use ClickButton mostly the nullpointer exception occurs. I mean this is perhaps a timing problem with windows events when the method was called. It is possible?



    My solution for this time is, to use one of the functions above, but I'm not happy about this, because it is very unclear for me why it happens since shortly time... 





    Stephanie 
  • Hi Stephanie,


    Thank you for the information.

    To follow up the issue, we also need information about TestComplete's process: could you please profile TestComplete in the same way as you profiled your application? Use the steps from my previous post, but in step 5, select the TestComplete.exe file.