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

Is zaptest cross device software?

Is zaptest cross device software?

Home Forums Ask Expert Is zaptest cross device software?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #57525
    Marco Malziotti
    Participant

      Good morning
      The first thing that struck me about ZapTest is that it’s a cross platform and cross device product.
      Now I have two mobile devices to test my app:
      – Samsung A3 with Android 8
      – Samsung A41 with Android 10
      The screenshot designer passed these screenshots to our test team and development team (see “zaptest” folder).
      I added these screenshots in ZapTest’s “Repository Expoler” (see “NewWhitelabel-Login.zap” file).
      As a first use case we would like to try the “LOGIN-NOK” (see file “dt-app-login.csv”).
      Commenting line 45 and uncommenting line 46, the test succeeds only on SamsungA3 (see report “Results – NewWhiteLabel-login – 04-19-23 09-47-17.zre”)
      Commenting out line 46 and uncommenting line 45, the test does NOT succeed on any device (see report “Results – NewWhiteLabel-login – 04-19-23 09-44-36.zre”).

      Requirement: I can’t ask the designer to replicate the same screenshots for every size of mobile device!

      How should I modify the “NewWhitelabel-Login.zap” script (code and/or “Repository Expoler”) so that the test succeeds on both devices?

      Thank you.
      Marco Malziotti

      Following link expire at 26/4
      https://octospa-my.sharepoint.com/:f:/g/personal/m_malziotti_octotelematics_com/Er0VPWQYdx9MjncoRYnybHIBmiGT5TCGG0p-q8Z3e5ug8g?e=bDlCBw

      #57542
      Sasha ZAP
      Moderator

        Hello Marco,
        I did a few updates to the objects in Step #45 and #46, please download the new “NewWhiteLabel-login_ZAP Update.zap” test from this shared directory:
        https://drive.google.com/file/d/1eoleLeSfLdVixAryaS6n0_etJlKTBett/view?usp=sharing
        Please note the following:
        – Only the Area object type is best to have its “Scalability” Property set to “Location and Size”.
        – Because the “arrowBack” and the “arrowBack2” objects are Image based objects, they are mostly dependent on their specific location:
        Therefore it sometimes requires different solutions to get ZAPTEST recognize such objects;
        Image based object must be anchored to a Relative Object which ZAPTEST will manage to locate without any difficulties;
        In some cases, each device may have different location to its Image based object, therefore if this is possible, for Image objects it is best get their View from all the Devices which the test supposed to run upon(And create a condition which will decide what View to use).
        Hope this helps.
        Thanks,
        ZAPTEST Team

        #57634
        Marco Malziotti
        Participant

          Thanks Sasha
          Can you convert script in free license please?

          Marco

          #57687
          Sasha ZAP
          Moderator

            Hello Marco,
            I’ve converted the script to ZAPTEST Free version – Please download it again from the same URL I’ve sent you previously (https://drive.google.com/file/d/1eoleLeSfLdVixAryaS6n0_etJlKTBett/view?usp=sharing).
            Thanks,
            ZAPTEST Team

            #57704
            Marco Malziotti
            Participant

              Sasha thank you for the script
              Unfortunately it only works on Samsung A3.
              With Samsung A41 can’t find object “arrowBack” line 45.
              See report “Results – NewWhiteLabel-login_ZAP Update – 04-21-23 12-09-24.zre” on same shared folder.

              Thanks,
              Marco Malziotti

              #57706
              Sasha ZAP
              Moderator

                Hello Marco,
                Basically if there is an object which cannot be recognized during runtime on a certian Device (With the current ZAPTEST scanned DeviceApplication), and you’ve tried all possible object’s recogniton technics, for such objects you must scan the actual Device which contains the unrecognized object and create an exception if this test runs upon such a Device:
                This is also true if there is only a single such unrecognized object.
                Hope this makes sense and it works for you.
                Thanks,
                ZAPTEST Team

                #57934
                Marco Malziotti
                Participant

                  Thank Sasha
                  I think the answer “for Image objects it is best get their View from all the Devices which the test supposed to run upon” is a strong limitation of the product that prides itself on being “cross device”.
                  I’ll adjust: I captured the view on SamsungA3 and on SamsungA41.
                  Now how can I decide in my script which of the two to use (see line 46 and line 48)?
                  Is there a way to read the screen resolution of the connected device?
                  Is it good practice to collect all views with a given resolution (e.g. all those with SamsungA41) in a given application, without mixing views with different resolutions in a given application?
                  Thanks
                  Marco Malziotti

                  see new script at following path:
                  https://octospa-my.sharepoint.com/:f:/g/personal/m_malziotti_octotelematics_com/Er0VPWQYdx9MjncoRYnybHIBmiGT5TCGG0p-q8Z3e5ug8g?e=KPAZ0y
                  (expire at 12/05/2023)

                  #58016
                  Sasha ZAP
                  Moderator

                    Hello Marco,
                    Please check the following answers to your last questions:
                    1. How can I decide in my script which of the two to use (see line 46 and line 48)?Please check the “Execute Specific Mobile Device.zap” script in the sharde directory(https://drive.google.com/file/d/1L-LRKJSAW3qH9_iHAEr9WSJxpj8n4p95/view?usp=sharing), you’ll need to update this test with your Views and add an Else statement with the other connected device;
                    Please note that using this method you cannot run the Launch method in ZAPTEST, because the Launch method will execute only the ZAP Viewer and ignor the Environment Manager (Which is part of my solution).

                    2. Is there a way to read the screen resolution of the connected device?Yes, you can, please follow these steps:
                    2.1 Using the Environment Manager take a screenshot of your connected device using the camera icon which its name is “Show device screenshot” (No need to execute yet the ZAP Viewer).
                    2.2 In the generated screenshot small window using the FILE->Save save the captured screenshot to some local directory.
                    2.3 Update this script with your capture screenshot details and run it from ZAPTEST (You can implement it in your original script):
                    Set objShell = CreateObject(“Shell.Application”)
                    Set objFolder = objShell.Namespace(““)
                    Set objFile = objFolder.ParseName(““)
                    ImageResolution = objFolder.GetDetailsOf(objFile, 31)

                    3. Is it good practice to collect all views with a given resolution (e.g. all those with SamsungA41) in a given application, without mixing views with different resolutions in a given application?No this is not a good idea, therefore you’ll need for each mobile device its own Application object for all is Views;Or the simplest and best solution is to create a testing script for each device type and run it according the connected device.

                    P.S. Basically ZAPTEST based scripts can run cross-device and cross-platform, but there are rare situations which require special solutions, as in your case.

                    Hope this helps.

                    Thanks,
                    ZAPTEST Team

                    #58056
                    Marco Malziotti
                    Participant

                      Thanks Sasha
                      My devices have the following resolution:
                      SamsungA3: 720 x 1280
                      SamsungA41: 1080 x 2400
                      My “special solution” is just to write a single script to allow selecting the arrowBack icon from both devices (running in parallel with M-RUN).
                      Can you please confirm that this is the only way to select the “arrowBack” icon in the two devices I have available (see script “NewWhiteLabel-login_ZAP Update3.zap”)?
                      Thank you.
                      Marco Malziotti

                      New path:
                      https://octospa-my.sharepoint.com/:f:/g/personal/m_malziotti_octotelematics_com/Er0VPWQYdx9MjncoRYnybHIBmiGT5TCGG0p-q8Z3e5ug8g?e=KiA2pC
                      (expire 05/19/2023)

                      #58256
                      Sasha ZAP
                      Moderator

                        Hello Marco,
                        Regarding your question, there are a few more options to move to a previous page in mobile:
                        – Emulate the actual mobile device buttons and execute them as necessary.
                        – Use the ZAP namespace methods, such as ZAP.Keyboard.KeyPress ZAP.Keys.Back – In some devices it works.
                        – Create a Swiper type object and execute it to swipe the screen to its previous view (In some devices siding a screen to the leftright shows you the previous and next pages).
                        – Check with your R&D team to check if there is a different option to go to a previous page.
                        – Use the Tab key to move between icons until it will focus on the correct icon, and then click on it (Or click the ENTER keyboard key):
                        Application(” Application Name”).View(“View Name”).Object(“Object to check if it exists”).Exist
                        ZAP.Keyboard.KeyPress ZAP.Keys.Tab
                        Wait 1
                        ZAP.Keyboard.KeyPress ZAP.Keys.Tab
                        Wait 1
                        ZAP.Keyboard.KeyPress ZAP.Keys.Enter
                        Wait 2

                        Hope this helps.
                        Thanks,
                        ZAPTEST Team

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