Forum Discussion

KevinL's avatar
KevinL
New Contributor
12 years ago

Novice Question - Testing Delphi App

Hi I am newbie to TestComplete and currently using it to test our app (written in delphi and operating SQL server datasource). Our app is quite stable and has been used by our customers for years.



One of our forms has got several dropdown lists and testboxes and the okay cancel buttons are located on the top part of the form. There are procedures after you click the okay button, to validate some inputs and ensure they are not null.



It is all good when running our app alone however TestComplete couldn't pick up the change that I have made to those fields (two dropdown lists and one textbox). It goes directly to my action of clicking the "okay" button and of course, the app will block any further actions to take place.



I was wondering if there is any solutions to the problem I had or anyone has clue about why would it happen?



I'd really appreciate your thoughts.



  • Hi Kevin,

    If I've well understood, the last succesfull action "The button was clicked with the left mouse button" allows you to open the window in wich you want select the "KEV_1".



    What I suspect is that this window has not the same element of recognition than when you record the test. the test is looking for a window "A" but there is a "B", so test considers as "unexpected".



    This may have several origin :



    - The test was recorded with the version N of your application and you try to apply to version N+1. But the building process assign an automatic number to some "anonymous" window. I've already noted this in our application (which is also in Delphi)



    - The name of the window is dependant of some parameter during the execution, like "my job title window", where job titla was X during record, and is Y during execution.



    What you can do is to add a "pause" in your test after opening the window and use the "Object Spy" to look at the Properties of your window, and then to compare to what is recorded in your test.



    Christophe

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Are there any warnings or errors in your test log after the execution?  What it sounds like is that you altered those fields in a way that TestComplete no longer recognizes them the same.  
  • Hi Kevin,

    I need some precision about what you've done to help you.

    If I've well understood, you've done a record of a test (as a Keyword test or a Sript ?) with TestComplete on a version N of your application. You've done some modifications (addition of two dropdown lists and one textbox) in your GUI that give you version n+1, and so you try to run the test on this new version. But the execution fails on this version (but of course is OK on the previous version).



    If this, did you should have an error in the Log of the test run that indicates the reason why TestComplete has not executed some step.



    Christophe





  • KevinL's avatar
    KevinL
    New Contributor
    Hi guys thanks for your replies, what I was trying to test using TestComplete is that:

    1. fire up the application

    2. log in with username and password

    3. in the main window - click 'new job', which will open up a new window to allow entering new job details

    4. select a certain 'sample type' - this is a mandatory field

    5. click save to save this newly created entry

    6. click 'exit' in main window to exit application



    Picture below shows both the main window and the 'new job' window









    This is the screenshot of our program. Here I was trying to pick up "KEV_1" from the "sample type" dropdown list. For some reasons, TestComplete wouldn't record my action.



    The error log shows 'unexpected window'







    Many thanks for your advice.
  • KevinL's avatar
    KevinL
    New Contributor
    Thanks Chris,



    Your post answers my questions perfectly. Cheers.