fbpx

How to search for icon in table

How to search for icon in table

Home Forums Ask Expert How to search for icon in table

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

      Good morning
      How can I verify that in the row (areaResultAvailab) corresponding to the result for a given “Car Group” there is at least one yellow icon with “1” (iconOne)?
      I attach scripts, reports and data sources.
      link (expires on 16/11/2022):
      https://octospa-my.sharepoint.com/:f:/g/personal/m_malziotti_octotelematics_com/EspZagMeWdFMtpjche03vlEBIbUVlvkIi6dtT0vNZJfl_Q?e=RftUrr
      Thank you.

      Marco Malziotti

      #45841
      Sasha ZAP
      Moderator

        Hello Marco.
        It appears I cannot access the https://dmp-sysc-dev.octotelematics.com URL, I’m getting the message “403 Forbidden”.
        I’ve updated the test with new commands which may help you, please check the attached “WS03-UC01_01-INSTOOL_RET_AVAILABILITY_ZAP Update.zap” file at the following shared drive (Download the entire appeared files):
        https://drive.google.com/file/d/1sZ0wqUyZcfdHYfWnfPKN8nagu8yYWDr7/view?usp=sharing
        In the testing script find the “ZAP Update” section (Lines #95-#101);
        Also please check how I’ve updated the “iconOne” object and added a new “iconOneYellow” object.
        Hope this helps.
        Thanks,
        ZAPTEST Team

        #45844
        Marco Malziotti
        Participant

          Thanks Sasha
          With a small modification (line 91) I don’t get the expected result.
          Is it correct to “translate” the areaResultAvailab object up or down starting from the line found in the list (listCarGroup)?
          I attach new script and report.
          https://octospa-my.sharepoint.com/:f:/g/personal/m_malziotti_octotelematics_com/Eg1huMcB9ghOgWbrNgVo4icBzcatjxXgqmyfLwIRUfqwZg?e=uXsttX

          Marco Malziotti

          #45845
          Sasha ZAP
          Moderator

            Hello Marco,
            Basically you can manipulate the coordinates of any object in ZAPTEST Repository, but maybe you do not need to do such in your case:
            I did some more changes to the script in the “ZAP Update” section (Line #95) , I’ve uploaded the new test to this shared drive:
            https://drive.google.com/file/d/1w1HFgVbXm_NDGn5rWx6ZQXzcw8D9z7US/view?usp=sharing
            Hope this helps.
            Thanks,
            ZAPTEST Team

            #45856
            Marco Malziotti
            Participant

              Thanks Sasha
              Unfortunately raised same errors as the previous version (lines 97 and 98).
              I remember that I am using the free version of ZapTest vers. 22.5.4.
              I attach report at the following link:
              https://octospa-my.sharepoint.com/:f:/g/personal/m_malziotti_octotelematics_com/EmRSbQp_wfRJiLGAuNWFebgBicsqUDX5bJpKWOTpwQlIKg?e=bBWYyJ

              Marco Malziotti

              #45858
              Marco Malziotti
              Participant

                Also I notice that the new script doesn’t find the correct lblItemCarGroup (see file “warning-at-line-96.png”)!
                Thanks

                Marco Malziotti

                #45860
                Sasha ZAP
                Moderator

                  Hello Marco,

                  Please place this code before my last update (Before Line #95):

                  Application(“SystemConsole”).View(“BNK-Availability&Price-NotAllZero”).Object(“lblItemCarGroup”).SetProperty “Text”, similarcarGroupDescr
                  Application(“SystemConsole”).View(“BNK-Availability&Price-NotAllZero”).Object(“lblItemCarGroup”).SetProperty “Appearance”, “2”
                  If Not(Application(“SystemConsole”).View(“BNK-Availability&Price-NotAllZero”).Object(“lblItemCarGroup”).Exist(500, False)) Then
                  Application(“SystemConsole”).View(“BNK-Availability&Price-NotAllZero”).Object(“lblItemCarGroup”).SetProperty “Appearance”, “1”
                  End If

                  This code will ensure that if there are more then a one similar “lblItemCarGroup” objects the next steps will be handling the correct object.
                  If this will work then the Area object will also be set properly during runtime and therefore all other relatate objects will be recognized as well.

                  P.S. In my original updated test, before adding the new code, please remove Line #95 (Application(“SystemConsole”).View(“BNK-Availability&Price-NotAllZero”).Object(“lblItemCarGroup”).SetProperty “Text”, carGroupDescr) because in the new added code there is already the same line of code and it is the prefered one.

                  Please advise.

                  Thanks,
                  ZAPTEST Team

                  #46785
                  Marco Malziotti
                  Participant

                    Thanks Sasha for your suggestions, everything works fine!
                    A last question:
                    the “iconGreen” icon (in “BNK-Availability & Price-AtleastOne” view) is not always on the first column. If you want to search for iconGreen in the whole area (areaResultAvailab), is it correct to indicate Scalability = None?
                    thank you again.

                    last version in:
                    https://octospa-my.sharepoint.com/:f:/g/personal/m_malziotti_octotelematics_com/Emz83sonpiFEg04YrKu2sdkBrJZiE6gZ-9rOSnAZTH-SmQ?e=ULE5RJ

                    #46788
                    Sasha ZAP
                    Moderator

                      Hello Marco,
                      Basically the Scalability Object’s property is to enable the object recognition in different screen resolutions, but yes you can try this as well.
                      Also you can try the following code to search for the object with the number ‘1’ and then the rest of the already existing code will check the color of the object:
                      Application(“SystemConsole”).View(“BNK-Availability&Price-NotAllZero”).Object(“lblItemCarGroup”).Area(“areaResultAvailab”).Object(“iconOne”).SetProperty “Text”, “1”
                      Application(“SystemConsole”).View(“BNK-Availability&Price-NotAllZero”).Object(“lblItemCarGroup”).Area(“areaResultAvailab”).Object(“iconOne”).Exist
                      If the object will not be found you can change the object’s “Recognition Type” property.
                      Hope this helps.
                      Thanks,
                      ZAPTEST Team

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

                    Virtual Expert

                    ZAPTEST

                    ZAPTEST Logo