Select label in variable popup area
Home › Forums › Ask Expert › Select label in variable popup area
- This topic has 3 replies, 2 voices, and was last updated 1 year, 4 months ago by Sasha ZAP.
-
AuthorPosts
-
November 29, 2022 at 12:47 pm #47435Marco MalziottiParticipant
Good morning
I would like to reuse the popup saved in the “DeleteConfirm” view also for other values of the lblTitle label.
Unfortunately the attached script does not correctly identify the lblQuestion, lblClose and lblConfirm labels: I tried all the scalability values.
When running, you notice the orange box (Highlight method) in the upper left corner of the screen and not from the corner of the areaPopup object.
It appears as if the objects are not children of areaPopup object.
Thanks for the help.
Marco Malziotti
Script, report and data source shared at:
https://octospa-my.sharepoint.com/:f:/g/personal/m_malziotti_octotelematics_com/EoEBKfeellZCugO28POBvlUBo9zX1WFjFiE5CkcEexYP_Q?e=UqehlW
(expire 06/12/2022)November 30, 2022 at 8:23 pm #47509Sasha ZAPModeratorHello 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=sharingHope this will work for you.
Thanks,
ZAPTEST TeamDecember 6, 2022 at 1:38 pm #47620Marco MalziottiParticipantThanks Sasha
I have the free version of ZapTest.
Does your version contain any features not supported in the free version?Marco Malziotti
December 6, 2022 at 7:15 pm #47626Sasha ZAPModeratorHello Marco,
I’m sorry about this – Please check the folowing shared download file:
https://drive.google.com/file/d/13dYFLIvEn6I77CwE9FLyNOhwt9wv1dxG/view?usp=sharing
Thanks,
ZAPTEST Team -
AuthorPosts
- You must be logged in to reply to this topic.