Hello Marco,
The Area object can to be initialised properly during runtime only if its parent object will be static:
In your case you are trying to set the Area’s parent object to be dynamic (Change its caption during runtime), with this configuration you will not be able to set an Area object in its expected position (The change during runtime of the coordinates does not work all the time) which I believe eventually you wish it to be dynamic.
In order to make a dynamic Area object during runtime you must first initialize it to some static close object (Object which nothing changes in it during runtime), and after its first setting only then you can update the parent object as you wish and make it dynamic (For example, changing its caption), then the Area object will change its position properly and then its child objects will be set accordingly.
In your case there is no static object to set an Area object properly, therefore I believe the script I’ve updated is the simplest solution in your case(Check from line #83, see how I’ve set the objects’ properties).
Please note if my update will not work for all popups you can use an Area object but this time it will be set to a specific popup, because it will need a parent object which, for example, will have a static caption.
This is the shared directory where I’ve uploaded my updated test:
https://drive.google.com/file/d/10mWfaMqNTAbSxet31vsVUOEmH5zJWB4J/view?usp=sharing
Hope this will work for you.
Thanks,
ZAPTEST Team