fbpx

Menu item selection – reused code2

Menu item selection – reused code2

Home Forums Ask Expert Menu item selection – reused code2

  • This topic has 5 replies, 2 voices, and was last updated 2 years ago by Sasha ZAP.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #47735
    Marco Malziotti
    Participant

      Good morning
      How can I select “Select all” or “Milano Stazione Centrle” in the “Pickup DMS” or “Drop off DMS” fields of the SM-PromoUpdate view?
      I tried both with object of type list (listItem) and with object of type area (areaList) but without success.
      Note that not all selectable items in the list are displayed on click in the “Pickup DMS” or “Drop off DMS” field (see “Milano Stazione Centrle”).
      I use ZapTest 22.6.4 free version.
      I attachet script, datatable and report at following link (expired at 12/19/2022):
      https://octospa-my.sharepoint.com/:f:/g/personal/m_malziotti_octotelematics_com/Egrx4thaBUBAmC8y3mtsAjUBVzAsFWccOH7IkSAQTBCRnw?e=In3tYM

      Thanks for your help.
      Marco Malziotti

      #47944
      Sasha ZAP
      Moderator

        Hello Marco,
        Can you please add the files again? It appears your files’ upload link got expired.
        I’m sorry about this.
        Thanks,
        ZAPTEST Team

        #48012
        Marco Malziotti
        Participant
          #48013
          Sasha ZAP
          Moderator

            Hello Marco,
            Thank-you, I’ve managed to open the link now.
            I’ll check your issue and reply as soon as possible.
            Thanks,
            ZAPTEST Team

            #48016
            Sasha ZAP
            Moderator

              Hello Marco,
              I’ve tried to execute the test but got a “403 Forbidden” error.

              Basically in your test I’ve noticed that you tried to use an Area object, which may work for you to find the required line of data, but you did one major mistake:
              You cannot set Area’s parent object as a dynamic object which its Properties’ values change during runtime, as you are doing in this command:
              Application(“SystemConsole”).View(“MultipleChoiceFromList2”).Object(“lblLabel”).SetProperty “Text”,”Drop off DMS'”
              In order ZAPTEST will locate the Area object, its parent object must be a static object which ZAPTEST will recognize quickly in the app, meaning:
              The “lblLabel” object must have already in its Text properties the “Drop off DMS'” text BEFORE the test gets executed (You can set a unique “lblLabel” object such as “lblDropofDMSLabel”).Therefore you cannot use the above mentioned command for an Area object’s parent.
              But you DO able to set properties’ values during runtime to the Area’s child object – Therefore such command is correct:
              Application(“SystemConsole”).View(“MultipleChoiceFromList2”).Object(“lblLabel”).Area(“areaList”).Object(“lblUnselected”).SetProperty “Text”,drfDms
              Hope this helps.
              Thanks,
              ZAPTEST Team

              #48027
              Sasha ZAP
              Moderator

                Hello Marco,
                Regarding the Area object I just wanted to mention the following:
                You do have the option to set the Area parent object as a dynamic object (For example, as you’ve coded, by changing its “Text” property during runtime), but this you can do ONLY after executing a command that has a status Area’s parent object + Its related Area object + One of Area’s objects child object, for example:
                Application(“SystemConsole”).View(“MultipleChoiceFromList2”).Object(“lblLabel”).Area(“areaList”).Object(“lblUnselected”).Exist
                And only after the above command will be executed you can execute a command such as:
                Application(“SystemConsole”).View(“MultipleChoiceFromList2”).Object(“lblLabel”).SetProperty “Text”,”Pickup DMS”
                Hope this helps.
                Thanks,
                ZAPTEST Team

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

              Virtual Expert

              ZAPTEST

              ZAPTEST Logo