Script runs successfully only once

Script runs successfully only once

Home Forums Ask Expert Script runs successfully only once

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #31325
    Shubhangi Shingade
    Participant

      I am using Free trial version to automate installation of an app.

      – How I wrote the script
      1. Launch the app, by executing exe.
      2. Used workbench to create repository
      3. Created script to launch the exe, provide username and password to start installation

      The script works as expected, with the Window from which the repository was build.
      Now, When I re-run the script, Zaptest can not find elements on the window and fails.
      I looks like the repository element are tied with the instance of the Window and do not work with different instance.

      I have attached the screenshots of my script and UI map.

      I am not sure, if I am missing something here. Has anyone encountered this issue before? How do I get around this problem?
      Thanks,
      Shubhangi

      Attachments:
      #31326
      Kirill Bulatnikov
      Participant

        Hello Shubhangi
        Thnaks for using ZAPTEST

        To make it clear – are you trying to run script on a different machine? Does it have the same Windows version?
        Is the script working repeatedly in the same instance of Windows?

        Thanks,
        ZAPTEST Team

        #31327
        Shubhangi Shingade
        Participant

          Hi,
          I am executing the script on the same machine.
          Yes the script runs if executed multiple times on same instance of the window.

          Regards,
          Shubhangi

          #31328
          Shubhangi Shingade
          Participant

            Hi Kirillb,
            I tried again, with a new repo. Did not work even once.

            Regards,
            Shubhangi

            #31330
            Shubhangi Shingade
            Participant

              Hi Kirillib,
              Will you be able to suggest any workaround ?

              Regards,
              Shubhangi

              #31331
              Kirill Bulatnikov
              Participant

                Hello Shubhangi

                Can you try following:
                Create couple of different scripts with the same application but each time running new instance of the same application.
                Then check in repository explorer property of Application object. See screenshot.

                Check if “regexpwndclass” and “regexpwndtitle” are remains the same or changing in different scripts. This may be the root cause of the issue.

                Thanks,
                ZAPTEST Team

                #31332
                Shubhangi Shingade
                Participant

                  Hi Kirillb,
                  Title remains same, however the class shows following for different instances.
                  HwndWrapper[Livedrive.exe;;7d8542e2-5178-4d9f-9cdd-2cd2ca688c48]
                  HwndWrapper[Livedrive.exe;;dd6f26c5-c6fd-44a3-9d9c-6f05530cf549]

                  IS there a way to use regex while defining the class or title ?

                  #31333
                  Kirill Bulatnikov
                  Participant

                    OK that’s exactly what I suspected of.

                    Please remove everything except “HwndWrapper[Livedrive.exe” from regexpwndclass. That should help.

                    Thanks,
                    ZAPTEST Team

                    #31334
                    Shubhangi Shingade
                    Participant

                      Thank you, worked. Atlast can find the application window.
                      I will check rest of the script.
                      I also wanted to know your thoughts about following.
                      When I launch the app exe, application setup window is launched with username credential textboxes. The user name text box is focused by default. Hence the OCR scanner sometimes, recognises Text as ‘lEmail Address’ (String with cursor).
                      Sometimes this makes the script to fail. Any workaround for these situations.

                      Regards,
                      Shubhangi

                      #31335
                      Kirill Bulatnikov
                      Participant

                        Try to use “OCR Partial” recognition for this object. That should resolve the problem.

                        Thanks,
                        ZAPTEST Team

                        #32549
                        vaidehi inda
                        Participant

                          I can’t find “RegExpwndclass” or “RegExpwndtitle” in Object properties of “Repository Exporer” could you please suggest. how to find them. I’m also stuck with same issue. Only once I see the script run successfully.

                          #32553
                          Sergey ZAP
                          Keymaster

                            Hello Vindavarapu,
                            The properties “RegExpwndclass” and “RegExpwndtitle” used only by an Application object.
                            Navigate to your application object (in script or Repository Explorer) and look in the Object Properties.

                            #32555
                            vaidehi inda
                            Participant

                              SergeyP,
                              I don’t find them in Object Properties section. I’ve attached the screenshot below. Please have a look.

                              IMG_0097.JPG

                              #32556
                              Sergey ZAP
                              Keymaster

                                You need to select Application object in Repository Explorer.

                                Attachments:
                                #32557
                                vaidehi inda
                                Participant

                                  ok thanks!

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

                                Virtual Expert

                                ZAPTEST

                                ZAPTEST Logo