Get your 6-month No-Cost Opt-Out offer for Unlimited software automation!

Run tests different resolutions

Run tests different resolutions

Home Forums Ask Expert Run tests different resolutions

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #32112
    Gabriel Fiel
    Participant

      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?

      #32113
      Kirill Bulatnikov
      Participant

        Hello 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.

        #32147
        Gabriel Fiel
        Participant

          Hi 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.

          zaptest.png

          zaptest2.png

          Thank you.

          #32148
          Kirill Bulatnikov
          Participant

            Hello 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.

            #32149
            Gabriel Fiel
            Participant

              It 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

              #32150
              Kirill Bulatnikov
              Participant

                Hey 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 Team

                #32151
                Gabriel Fiel
                Participant

                  Hey

                  I’ll try to do it, use image object, thank you 🙂

                  #33218
                  Marco Malziotti
                  Participant

                    Hi 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 August

                    P.S. I use ZapTest free version v22.3.5 on windows 10 64-bit desktop.

                    Attachments:
                    #33251
                    Sasha ZAP
                    Moderator

                      Hello 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 Team

                      #33284
                      Marco Malziotti
                      Participant

                        Thanks 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?
                        Thanks

                        Marco Malziotti

                        Attachments:
                        #33285
                        Sasha ZAP
                        Moderator

                          Hello 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 Team

                          Attachments:
                          #33318
                          Marco Malziotti
                          Participant

                            Hello 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

                            #33319
                            Sasha ZAP
                            Moderator

                              Hello 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 Team

                              #33320
                              Marco Malziotti
                              Participant

                                Hello 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 SUCCESS

                                A 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

                                #33321
                                Sasha ZAP
                                Moderator

                                  Hello 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

                                Viewing 15 posts - 1 through 15 (of 15 total)
                                • You must be logged in to reply to this topic.