Two Methods of checking text in HTTP protocol in LR-zee

Source: Internet
Author: User

There are two ways to perform text check points in http: Method 1: correlation value judgment

// This method is often used to take the initiative to find trouble, but it cannot be used to check the function, you can consider using this method (I have not encountered a situation where the function cannot be checked by checking the value) // no matter where the value is to be determined, in server response. Char buffer [20] = {0}; Int J; int I; char str1 [] = "dianping"; web_reg_save_param ("param1", "lB = www. "," RB =. com "," ord = 18 ", last); web_url (" www.hao123.com "," url = http://www.hao123.com/"," resource = 0 "," reccontenttype = text/html ", "Referer =", "snapshot = t1.inf", "mode = html", extrares, "url =/line.gif", Enditem, "url =/images/dropdown.gif", Enditem, "url =/images/guangg/baike.gif", Enditem, last); // lr_log _ Message ("% s,", lr_eval_string ("{param1}"); If (atoi (strcmp (str1, lr_eval_string ("{param1}") = 0) {// check whether the value obtained by the association function is the same as the defined value. For example, print the following lr_log_message ("Give it to me !! ");}
    Method 2: function judgment Note: The web_find function cannot check the value that is not displayed on the page, whereas web_reg_find can. Web_reg_find cannot be placed at the end of action.

Web_reg_find ("text = dianping", last); web_url ("www.hao123.com", "url = http://www.hao123.com/", "resource = 0", "reccontenttype = text/html ", "Referer =", "snapshot = t1.inf", "mode = html", extrares, "url =/line.gif", Enditem, "url =/images/dropdown.gif", Enditem, "url =/images/guangg/baike.gif", Enditem, last); web_find ("web_find", "What = Music MP3", last );
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.