Failure to send type command

Failure to send type command

Home Forums Ask Expert Failure to send type command

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #31814
    Gurpreet Singh
    Participant

      Hi,

      I am trying to write script to send type command into application under test but cannot seem to work.

      i want to type “Admin” into username field. When I execute script, that step result shows passed in execution result but I don’t see “Admin” typed.

      Please see attached screenshot, thanks.

      Attachments:
      #31815
      Sasha ZAP
      Moderator

        Hello gsingh2014,

        In the final test report a passed step result appears when ZAPTEST managed to locate and recognize the object, the actual typing appear only in the AUT (Application Under Test) physically:
        Did the “Admin” was physically typed in the AUT?

        Basically there are 3 ways to check it programmatically:
        1. Using the “GetText” method upon the object after typing the “Admin” string, in order to output the actual printed text (This you can do by using a Message-Box).
        2. Using the “CaptureBitmap” method upon the object or the entire page after typing the “Admin” string, in order to add to the final test report a screenshot of the object’s status.
        3. Verify page’s status after the login UID was processed.

        Hope this helps.

        Thanks,
        ZAPTEST Team

        #31816
        Gurpreet Singh
        Participant

          “Admin” was not typed in.

          Although I noticed that:

          When script was executed, Cursor moved in username input box but nothing got typed in.

          I will try your steps.

          Thanks

          #31817
          Sasha ZAP
          Moderator

            Hello gsingh2014,

            Can you check please if when the AUT is being executed by ZAPTEST this Username input box is disabled?

            Please advise.

            Thanks,
            ZAPTEST Team

            #31818
            Gurpreet Singh
            Participant

              Hi Sasha,

              I tried step 1 and see empty message box after script is executed:

              1. Using the “GetText” method upon the object after typing the “Admin” string, in order to output the actual printed text (This you can do by using a Message-Box).

              Script:

              Application(“Power ON”).View(“View 4”).Object(“Image Object 5”).Click
              Application(“Power ON”).View(“View 5”).Object(“Image Object”).Click
              Zap.Keyboard.SetTypeDelay 1000
              Application(“Power ON”).View(“View 6”).Object(“Username”).Object(“txtusername”).Type “Admin”
              msgbox Application(“Power ON”).View(“View 6”).Object(“Username”).Object(“txtusername”).GetText

              #31819
              Gurpreet Singh
              Participant

                How do I check this?

                Can you check please if when the AUT is being executed by ZAPTEST this Username input box is disabled?

                #31820
                Sasha ZAP
                Moderator

                  Hello gsingh2014,

                  You can check this by placing a breakpoint after the Type method, then go to the executed already AUT and check if you can type something into the Username text-box.
                  Basically I can check this for you only if the AUT is public (If yes then I’ll need its URL).

                  Thanks,
                  ZAPTEST Team

                  #31821
                  Gurpreet Singh
                  Participant

                    I placed breakpoint after type line and set it to wait.

                    I went to AUT and can type into username text box.

                    #31822
                    Sasha ZAP
                    Moderator

                      Thanks gsingh2014.

                      Can you please attach your test (attach the *.zap file) and if the AUT (Application Under Test) is public send me its URL and if not please attach also a screenshot of the page with the problematic Username text-box.

                      Thanks,
                      ZAPTEST Team

                      #31855
                      Gurpreet Singh
                      Participant

                        Thanks Sasha for your help.

                        I have attached script file and screenshot.

                        #31856
                        Sasha ZAP
                        Moderator

                          Hello gsingh2014,

                          I’ve ran your test in my end and it appears your Username object cannot be recognized during runtime:
                          Can you please rescan this page and try again.

                          If the above will not help do the following:
                          Remove the “regexpwndclass” Application’s object property value and run the test again.

                          Thanks,
                          ZAPTEST Team

                          #31867
                          Gurpreet Singh
                          Participant

                            I tried both scenarios:

                            1. Re-scanned the object view where Username is displayed.
                            2. Removed “regexpwndclass” Application’s object property value

                            Still no luck.

                            Thanks

                            #31868
                            Sasha ZAP
                            Moderator

                              Hello gsingh2014,

                              Please try the following:

                              1. Add another attribute to the Type method, “True” to the “UsePhysicalKeyboardEvents” attribute, so the full command will be:
                              Application(“Power ON”).View(“View 6”).Object(“Username”).Object(“txtusername”).Type “Admin”, 0, False, True

                              2. If this will not help please scan again the page but this time save it with a different Application object’s name (Instead of “Power ON” Application object’s name, before saving the new scan, set a different name only for this specific window).

                              Thanks,
                              ZAPTEST Team

                              #31869
                              Sasha ZAP
                              Moderator

                                Hello gsingh2014,

                                Please try the following:

                                1. Add another attribute to the Type method, “True” to the “UsePhysicalKeyboardEvents” attribute, so the full command will be:
                                Application(“Power ON”).View(“View 6”).Object(“Username”).Object(“txtusername”).Type “Admin”, 0, False, True

                                2. If this will not help please scan again the page but this time save it with a different Application object’s name (Instead of “Power ON” Application object’s name, before saving the new scan, set a different name only for this specific window).

                                Thanks,
                                ZAPTEST Team

                                #31870
                                Sasha ZAP
                                Moderator

                                  Hello gsingh2014,

                                  Please try the following:

                                  1. Add another attribute to the Type method, “True” to the “UsePhysicalKeyboardEvents” attribute, so the full command will be:
                                  Application(“Power ON”).View(“View 6”).Object(“Username”).Object(“txtusername”).Type “Admin”, 0, False, True

                                  2. If this will not help please scan again the page but this time save it with a different Application object’s name (Instead of “Power ON” Application object’s name, before saving the new scan, set a different name only for this specific window).

                                  Thanks,
                                  ZAPTEST Team

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

                                Virtual Expert

                                ZAPTEST

                                ZAPTEST Logo