fbpx

Zap-fix mismatch error when trying to execute CInt

Zap-fix mismatch error when trying to execute CInt

Home Forums ZAPTEST Old Posts Zap-fix mismatch error when trying to execute CInt

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30653
    Alisha Michaels
    Participant

      Hello Zap,

      We have a testing script which captures a numeric text from the application and using the CInt we convert it into integer, unfortunately sometimes the line in the script with the CInt command gets a mismatch error in Zap-fix (Standalone version) – Why is this happen?

      Thanks.

      #30654
      Sasha ZAP
      Moderator

        Hello AlishaM,

        Thank-you for your question.

        Basically the Zap-fix Standalone version is now called ZAPTEST.
        Regarding your question:
        You’re probably get a type mismatch because your test captures some unrecognizable characters from your AUT (Application Under Test), meaning:
        There might be some extra spaces in the captured string (Which you can remove using the Trim(captured string) method), or there is some other characters which ZAPTEST cannot read it as a string (Or cannot convert it into Integer), also your waiting time may not be enough for the text to appear so the test will captures some other characters (Which also may not be converted into integer) – Please do the following:
        If the test pauses due to the same reason, in the Locals tab (Located at the bottom pane below the editor) check what is the value of the captured string (You can place it into a variable to make it appear in the Locals tab), if this is not a numeric string then this is the issue which ZAPTEST captures sometimes a wrong characters (Sometimes it happens because of the sting’s coordinates shift during runtime due to different reasons);
        Also you can do the following experiment:
        Place a breakpoint (Ctrl + k) at line where the string is being captured from the AUT, once the test will stop at the breakpoint (It will not end) go to the below Locals tab and check the value of the captured string to see if it is a numeric text (Which can be transformed into an integer), let the test run and see if it fails again at the same time as before, if yes then there is some other issue we need to check.

        Please contact Zap for further help.

        Thanks,
        Sasha

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

      Virtual Expert

      ZAPTEST

      ZAPTEST Logo