Forum Discussion

rtgreen's avatar
rtgreen
New Contributor
9 years ago

Consistency in play back

Hello all

 

I did try to search and look around the internet, but I couldn't find anything obviously relating or a solution to my problem.


The issue is I have created a test made from several keyword tests which runs fine, but if I run it several times, eventually it breaks in what looks to be the same place every time.

 

The first time it ran 150+ times before stopping, but after trying to fix the issue I have seen it fail on run 29 and later at 50.

 

the script in question clicks a check box, then clicks a button before moving to the next keyword test.

 

First it failed to click the check box because it wasn't there, so I put delays at the start and then between clicking the check box and button, but still it struggles.

 

I have an error condition so if there is an issue and the software is not where it should be at the end of the test, it restarts the software ready for the next cycle, however it just ends and goes to the summary screen. However the playback properties stop on error and stop on warning are both disabled so it should work.

 

Does anyone know how to make the button clicking more consistent or how to make the test cycle on error?

 

Thanks

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I will answer it this way:

     

    It depends.  The issue you described sounds to be related to either a timing issue (the tests are running faster than the application can keep up) or an object identification issue (objects are identified using dynamic properties that change from run to run).  Adding hard coded delays for the former HELPS... but it's no guarentee.  That's where Wait methods work best.

     

    As for the second possibility, it's hard to diagnose as it is.  For us to help you best, we'd need to know what errors, specifically, are showing up in the log to make sure it is object identification problems.  We'd also need to know more about the objects taht it's failing on (property/method listing, class, etc).

     

    So... yes, there is an answer to your problem, but it will take some work and some more information from you to solve it.

  • I had same kind of problems with  form and button and then i found that actually button did exists but it was not yet invisible. And you just can't click invisible button. 

    So I just added call to   aliases.appname.FormName.WaitProperty('Visible',true);  ( delphiscript ) 

     

    If this isn't the case , pls provide more accurate error etc. 

  • rtgreen's avatar
    rtgreen
    New Contributor

    Thanks for the replies.

     

    I have placed a few if object not available statements in a few of the more troublesome scripts and they seem to be more stable.

     

    I have also added timers to test the lengths of each test to see if it is indeed the software running too slow.