Forum Discussion

eric_robinson's avatar
eric_robinson
Occasional Contributor
13 years ago

Problem with Region Update

I am trying to use the "Update" option to update my regions whenever Region.Check is called on each region.  I have enabled the "Update regions" option in Tools|Options|Engines|Stores, but the regions are not being updated.  The comments in the log say they are, but the image isn't changing and the time stamp stays the same original time from a day ago. 



I have six regions and I was able to get one, the last one in the list, to update.  So I thought maybe there was a bug that only updated the last one in the list.  I renamed the last one so it would be first.  Now, not only will the new last one in the list not update, the original one that was updating will no longer update.  In other words, even though I have "Update" checked for all regions, none are being updated even though the log says they are.



Am I missing something or is it a bug?  Has anyone else had trouble with this?  I am a new user with only about a month or two of experience with TestComplete so I am a little reluctant to submit it as a bug quite yet. 



I am using version 8.70.727.7.



Thanks for your time!

8 Replies

  • Hi,


    To update the stored images using the Region.Check method, you need --


    1. To enable the Update regions setting.


    2. To check the Update box for each image to be updated in the Regions Editor.


    Are you sure that these requirements are met?

  • eric_robinson's avatar
    eric_robinson
    Occasional Contributor
    Margaret,



    Yes, I have the "Update regions" (although the link in your step 1 calls it "Update pictures") option enabled and I have the Update box checked for all regions.  It worked for only one region at some point, but I can't get it to work for any region anymore.



    Thanks,

    Eric Robinson
  • Hi Eric,


    I cannot reproduce such a problem in TestComplete 8.70.


    Could you please send us the script you are using, a screenshot of the Regions editor and a screenshot of the Stores Options dialog?

  • eric_robinson's avatar
    eric_robinson
    Occasional Contributor
    The relevant scripting code is



    Regions.Source_Unselected.Check(mapWindow);



    This line is the same code for all of my regions.  Only the region name changes.



    I'll attach the screenshots you requested. Please let me know if I can help in any other way.



    Is it possible that the method of region checkpoint creation makes a difference?  For example, some of them were created while recording a test.  Others were created manually and then referenced from a test script.  All have at least once after they were created.  I will try different ways of creating them and see if that has any effect.


  • eric_robinson's avatar
    eric_robinson
    Occasional Contributor
    Here is what I have been doing to reproduce the problem.



    1.  While recording a test, create a region checkpoint.

    2.  Before running the test, I click on the Update check box for the region I just created.

    3.  When I run the test, the region did update.



    4.  Then I right-click on the region in the Regions Editor and rename the region.

    5.  Make sure the update check box is still checked.

    6.  Run the test again.  This time the region did update.



    7.  Edit the name again to change back to its original name.

    8.  Make sure the update check box is still checked.

    9.  Run test again.  Region did not update.



    10.  Create a new region from the Regions Editor by right-clicking and choosing New Item. There is no option to give it a name so leave the default name.

    11.  Make sure the update check box for this new region is checked.

    12.  Add the code to check this new region. 

    13.  Run the test again. Region did update correctly.



    14.  Rename the region created in step 10 (since there was no way to set the name on creation of the region).

    15.  Make sure the update check box for this new region is checked.

    16.  Run the test again. Region did not update correctly.



    So, as you can see, once I rename a region, it will no longer get updated.  Please let me know if you can reproduce this behavior.



    Thanks,

    Eric Robinson
  • Hi Eric,


    I cannot reproduce the problem again.


    If the problem still occurs, please send us your test project and the application under test.

  • eric_robinson's avatar
    eric_robinson
    Occasional Contributor
    I can still reproduce it every time so I don't know why you wouldn't be able to.



    I am unable to send you the application being tested as I am testing an extension to the application and don't have the license to share the main application.  I will try it with something like Notepad.



    Also, I noticed that in my Regions folder, there are two files for every region that isn't getting updated.  However, the one region that I have not renamed (so the one that is still being updated correctly) only has one file in the folder, the .PNG file. The others have a file by the same name as the .PNG file, but does not have an extension. Any insight into this?



    For example, I have

    region1.png

    region1

    region2.png

    region2

    region3.png



    From this list, only region3 is getting updated.  Notice it is the only region that doesn't have a file without an extension.
  • Hi Eric,


    Please send us detailed steps to reproduce the problem with Notepad, exactly specify --


    1. How you add regions to the project.

    2. How you record or write the script that use the Regions.Check method. Also, please send us the script code.

    3. Where you rename the regions.