Run tests different resolutions
Home › Forums › Ask Expert › Run tests different resolutions
- This topic has 14 replies, 4 voices, and was last updated 2 years, 4 months ago by Sasha ZAP.
-
AuthorPosts
-
November 19, 2018 at 6:39 pm #32112Gabriel FielParticipant
Is ZAPTEST supposed to run on different computers?
For example: I’m creating my tests using my laptop, screen is HD.
Should these tests run in other computers with different resolution, lets say a PC screen Full HD?November 19, 2018 at 7:13 pm #32113Kirill BulatnikovParticipantHello gabriel.fiel. Thanks for using ZAPTEST.
The test can be run on either small screen of laptop or huge display or even projector. It also platform independent.
Thanks,
ZAPTEST Team.November 21, 2018 at 8:38 pm #32147Gabriel FielParticipantHi kirillb
I’ll use this topic because I think it is related.
I’m facing an issue with 2 differente OS
My tests are running on windows 10, when I try to run on windows 7 (same application, configuration and resolution, different screen size) some commands don’t execute, mainly when it involves coordinate objects.So what I did: I highlighted an object on both, the first it hightlights the object in a way. The second one in another way, and it doesn’t click some buttons because of that difference.
How can I work it around? I don’t want to create two different .zap files for the same test.Thank you.
November 22, 2018 at 2:04 am #32148Kirill BulatnikovParticipantHello gabriel.fiel
Can you please specify what your object is? Is it an image or OCR or is it a related object (in this case – what is the parent object for it)?
Thanks,
ZAPTEST Team.November 22, 2018 at 6:28 pm #32149Gabriel FielParticipantIt is a coordinate object.
I think the title bar, on the top of the app, from windows 7 and windows 10 have different heightd, maybe this is the problem? Idk
November 22, 2018 at 6:37 pm #32150Kirill BulatnikovParticipantHey Gabriel
It is absolutely logical that coordinates will changes as soon as resolution changes. Coordinates value based on screen pixels count so for example if your screen resolution will be 2x bigger then coordinates should increase 2x too.
To avoid this you need to use OCR or Image type of object. In your case try to select “+” icon (the one you are trying to click) precisely in the GUI Map and set recognition type as image for it.
Hope that helps.Thanks,
ZAPTEST TeamNovember 22, 2018 at 7:34 pm #32151Gabriel FielParticipantHey
I’ll try to do it, use image object, thank you 🙂
July 27, 2022 at 10:49 am #33218Marco MalziottiParticipantHi kirillb
I’ll use this topic because I think it is related.
I’ve same problem with a “image object” related of a “OCR” object (see “iconModify1” in “RegistryFilled” view of “CBPRO-it” application).
I’ve used a “Location” scalability in iconModify1 object to avoid problems with different screen resolutions.
But something went wrong.
Why does the test work (iconModify1 is clicked at line 50) with the same resolution with which I captured the view, while with different resolutions the test does not work (iconModify1 is not clicked)?
Thanks.Password to replace in “dt-cbpro-modify-email.csv” file (password field):
https://ots.octotelematics.com/secret/o57makbjja49fxxucyqe17mjy7ptta0
expires on 10 AugustP.S. I use ZapTest free version v22.3.5 on windows 10 64-bit desktop.
Attachments:August 3, 2022 at 4:14 pm #33251Sasha ZAPModeratorHello Marco,
1. In your script you use an Application named “Mobile” (Line #27)- You do not have such an Application’s name.
2. If you use an image type object in your script it is best to keep the same resolution as you had when the object was added to the Repository, otherwise if you’ll run the test on a different resolution the Image type objects will not be found properly (Because the amount of pixels differ in different resolution setups):
Regarding OCR based objects, because their primary recognition in runtime based on their Text, different resolution may not affect them.
3. You can try and set the object Area as a Relative Object to the Image based object as I added to your script(See attached updated “CBPRO – modify email4_ZAP update.zap” test, line #50).P.S. Your UID does not work and I could not run the test and debug it(See attached “nisan credentials error.jpg” screenshot).
Hope this helps.
Thanks,
ZAPTEST TeamAugust 4, 2022 at 4:24 pm #33284Marco MalziottiParticipantThanks Sasha for correcting line 27.
The password to replace in the .csv file is this:
https://ots.octotelematics.com/secret/q5y40khv1swh3pwhxq57pbkeqxwgfwt
(the link expires in 7 days)
Unfortunately your subsequent modifications to the script do not allow me to successfully execute the same in different resolutions than the one with which I captured the views in the repository (see attached report).
Is it possible that there is no solution?
What is the purpose of the scalability field (see video in: https://www.zaptest.com/docs/scalability-property)?
Shouldn’t it help in these cases?
ThanksMarco Malziotti
Attachments:August 4, 2022 at 6:43 pm #33285Sasha ZAPModeratorHello Marco,
I did a few more changes to the script and I believe it supposes to work now (See attached script).
P.S. I could not reproduce the password after one try.
Thanks,
ZAPTEST TeamAttachments:August 5, 2022 at 10:56 am #33318Marco MalziottiParticipantHello Sasha
With your script I obtain this runtime error (resolution is the same that views stored in the repository).
Password is Octo2022
Still wondering what the scalability field is for.
Thanks.Marco Malziotti
Attachments:August 5, 2022 at 6:11 pm #33319Sasha ZAPModeratorHello Marco,
I’ve attached updated test with a completely new line #56 which was added with new added objects (This new line does work in my machine):
I believe although you’ve managed to highlight your Email object this is occurs mainly due to its OCR recognition mechanism;If you are assigning Area and Image based objects it is best to add them from the machine with the same environmentresolution you are using to execute the test from.
The Scalability property uses the relative locationsize of an object (To its assigned Relative Object), this is especially helpful for the Area and Image based objects (Which are not an OCR based objects), but there are cases which it may not work properly (I believe like in your case) – In such different environments it is best to do the following:
– Adjust the environment which the script does not run in it properly to the same environment’s settings where the test does work;
– OrAnd add new objects (Especially Area and Image based objects) from the environment where the test has trouble to run successfully, and create a condition when to use such object.
Hope this helps.
Thanks,
ZAPTEST TeamAttachments:August 14, 2022 at 3:52 pm #33320Marco MalziottiParticipantHello Sasha
Your script succeeds in clicking the “iconModify1” button and show “EmailModify” pop-up on 4/5 screen resolution.
Below are the results:resolution result
1920×1080 NOK
1680×1050 SUCCESS
1600×900 SUCCESS
1440×900 SUCCESS
1280×768 SUCCESSA curiosity, with what resolution did you capture the “Registry Filled” view?
So in summary: when an image is the child of a label (OCR recognition) is it better to insert an Area between them?
Can you give me an example where scalability works well with an image based objects, unlike my “unfortunate” case?
Thanks.Marco Malziotti
August 15, 2022 at 5:16 pm #33321Sasha ZAPModeratorHello Marco,
Regarding your questions:
Q: A curiosity, with what resolution did you capture the “Registry Filled” view?
A: I’ve recorded the step in a monitor with the resolution of 1680×1050.Q: So in summary: when an image is the child of a label (OCR recognition) is it better to insert an Area between them?
A: Not necessary, if ZAPTEST will have difficulties to locate image based object it is best to set it as a Relative object to an Area based object.Q: Can you give me an example where scalability works well with an image based objects, unlike my “unfortunate” case?
A: There is no definite example for such best practice, in each Object’s Properties you have a variety of options to enable ZAPTEST locate the object in a page, in some cases Scalability will work flawlessly and in other cases you’ll need to define more Properties’ values to enable ZAPTEST locate the object – In your example I’ve tried different options until I’ve found the best object’s recognition way.Hope this helps.
Thanks,
ZAPTEST Team -
AuthorPosts
- You must be logged in to reply to this topic.