Example: web.get_int_property

The following example uses the get_int_property function to check if the script successfully accessed the my_home home page.

try
{
int HttpRetCode;
    web.url("my_home",
        "URL=http://www.yahoo.com",
        new String [] {"TargetFrame=_TOP", "LAST"});

// Note that the constant requires the class specification lrapi.web

    HttpRetCode = 
web.get_int_property( web.HTTP_INFO_RETURN_CODE );
    System.out.println(HttpRetCode);

    if (HttpRetCode == 200)
        lr.log_message("The Vuser successfully accessed yahoo");
    else
        lr.log_message("The Vuser failed to access yahoo");
}
catch (Exception e) {}
Example: Output:
HTTP_INFO_RETURN_CODE = 200
HTTP_INFO_DOWNLOAD_SIZE = 53685
HTTP_INFO_DOWNLOAD_TIME = 2204