Script runs successfully only once
- This topic has 16 replies, 5 voices, and was last updated 5 years, 3 months ago by
Sasha ZAP.
- You must be logged in to reply to this topic.
Home › Forums › Ask Expert › Script runs successfully only once
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
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
Hi Kirillb,
I tried again, with a new repo. Did not work even once.
Regards,
Shubhangi
Hi Kirillib,
Will you be able to suggest any workaround ?
Regards,
Shubhangi
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
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 ?
OK that’s exactly what I suspected of.
Please remove everything except “HwndWrapper[Livedrive.exe” from regexpwndclass. That should help.
Thanks,
ZAPTEST Team
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
Try to use “OCR Partial” recognition for this object. That should resolve the problem.
Thanks,
ZAPTEST Team
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.
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.
SergeyP,
I don’t find them in Object Properties section. I’ve attached the screenshot below. Please have a look.
You need to select Application object in Repository Explorer.
ok thanks!
Hi,
I’ve created script couple of months back, when I created script it was running successfully and gave 100% result. When I run the same script again today with latest Zap test build, Some of the elements are not recognized by the script. Script results says it clicked on “Page Clip” element on top right corner of the webpage(please see images attached below). But when click on “Page clip” element, “Clip whole page” and “Cancel” buttons should be shown allowing users to take screenshot of whole page. So my script is looking for (Scroll To) “Clip Whole Page” button and fails to find it. And script run fails. I’ve attached images of TestResults, Script steps and image expected result after clicking “Page Clip” on web page.
Please suggest.
Thanks.
Already have an account? Login
Check you SPAM folder if you do not see the email.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |