put the logic after the co-related string
strtok is used when you get a long value from load runner seperated by delimiters for example,( and you want to seperate each value from the delimiters
logic()
{
extern char *strtok(char * string,const char * delimiters); // explicit declaration
char seperators[]= "(,";
char *token;
char c[100];
char * a[100];
char * d[100];
int i=0;
strcpy(c,lr_eval_string("{c_ContentGUID}"));
token= (char *) strtok(c,seperators); //Get the first token
if(!token)
{
lr_output_message("No token found in the string");
return (-1);
}
for(i=0; token !=NULL;i++)
{
a[i]=token;
lr_output_message("%s", a[i]);
token= (char *) strtok(c,seperators); // get the next token
}
lr_save_string( a[6],"c_ContentGUID");
lr_save_string( a[5],"c_fgfgh");
lr_save_string( a[2],"c_xyz");
lr_save_string( a[1],"c_sret");
lr_output_message("c_ContentGUID : %s", lr_eval_string("{c_ContentGUID}"));
return 0;
}
I am learning Qtp training in Chennai and now I am in intern, so I have referred a lot of blogs to enhance my skill test to get a good job ion testing industry, Thanks for the informative article.
ReplyDeleteThanks for this nice post about Software Testing; I hope you will post more regarding software testing, keep blogging...
ReplyDeleteRegards,
Software testing training|Software training|Software testing training in Chennai
I was curious if you ever considered changing the layout of your site? It’s very well written;
ReplyDeletefire and safety course in chennai
ReplyDeleteThis post is so interactive and informative.keep update more information...
German Classes in Chennai
German Classes in Bangalore
German Classes in Coimbatore
German Classes in Madurai
German Language Course in Hyderabad
German language classes in bangalore
German language course in bangalore
German courses in bangalore
Selenium Training in Bangalore
Software Testing Course in Bangalore