
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I am having issues using the WebVerifyData function to determine if a certain string exists on a JSON script page. I know that the string is there, but the result is always 0. Here is my code:
WebVerifyData("ATL_FORM", SEVERITY_ERROR, nVERIFY);
Even though that string does exist on the web page, the function does not find it. Thank you so much for your help on this!
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
For your sanity, capture the response in a string and print it out. Verify what you expect is being captured.
If it is indeed being captured then there is something wrong with the way you are calling the WebVerify function (jonny's suggestion) or it may simply not work for your use case. If you can verify the text exists you can manually search for the text using a simple string search like this:
sText := some web response capture function...
iResult := StrSearch(sText, "What I'm looking for", STR_SEARCH_FIRST);
print("StrSearch result: " + iResult);
if ( iResult = 0 ) then
RaiseError(0, "Success verification failed " + what_im_looking_for + " was not found...", SEVERITY_TRANS_EXIT );
end;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
try specifying more parameters in the function. In particular, you have no nOptions parameters which means the default used is WEB_FLAG_GREATER, however you also haven't specified nAppearance (against which the greater than parameter compares) so maybe that's the problem. If the value occurs only once then try changing the function like this:
WebVerifyData("ATL_FORM", 1, WEB_FLAG_EQUAL , SEVERITY_ERROR, nVERIFY);
If that doesn;t work, check that the value isn't actually coming in as part of the header or embedded content - if it is then specify those flags instead.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello Jonny,
I tried the code as suggested, but I am still getting the same results. I also tried WebVerifyContent, but in that case I am always getting TRUE as a result, even if the string is not there. Could JSON be the issue? The header/embedded content is not an issue. Any suggestions you might have would be appreciated!
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
You might need to try WebVerifyDataBound or WebVerifyDataBoundEx with bounds specified. If you cannot get it to work please log a support incident.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
For your sanity, capture the response in a string and print it out. Verify what you expect is being captured.
If it is indeed being captured then there is something wrong with the way you are calling the WebVerify function (jonny's suggestion) or it may simply not work for your use case. If you can verify the text exists you can manually search for the text using a simple string search like this:
sText := some web response capture function...
iResult := StrSearch(sText, "What I'm looking for", STR_SEARCH_FIRST);
print("StrSearch result: " + iResult);
if ( iResult = 0 ) then
RaiseError(0, "Success verification failed " + what_im_looking_for + " was not found...", SEVERITY_TRANS_EXIT );
end;