Highlighted
Absent Member.
Absent Member.
718 views

Output text from Vugen

I am creating a script to add users in the application. I want to output the confirmation message "user 01 has been created" to one external spreadsheet to confirm that the user has been created. I don't see any option to output this message to the excel file. I have done this in QTP but not sure how this works in Vugen. Please help.
0 Likes
4 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Output text from Vugen

It is not a functional testing tool. If you want to do such things, do with QTP only.
In LR, you can manually open a File stream and write the output to that.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Output text from Vugen

You may try inserting a web_reg_find() for the text to be captured on the page !
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Output text from Vugen

You can do this using file operations. Follow the below example which gives you some idea

Action()
{
long fp;
fp= fopen("c:\\sample.txt","a");
lr_save_datetime("%d-%m-%y",DATE_NOW ,"datetime");
fprintf(fp,"Iteration Number is %s \n",lr_eval_string("{Iteration}"));
fprintf(fp,"Todays date is %s \n",lr_eval_string("{datetime}"));
lr_save_datetime("%d-%m-%y",DATE_NOW + ONE_DAY ,"datetime1");
fprintf(fp,"date after one day is %s \n",lr_eval_string("{datetime1}"));
fclose(fp);
return 0;
}

By following the above example, you can write the required text to the file by capturing the user names using web_reg_find function. ( Eg. web_reg_find("text=google","savecount=cnt",LAST);)
Note: it is not possible to copy the text into a .csv file. You need to convert the flat file into spread sheet manually if required.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Output text from Vugen

Couldn't you just check the database?

There is no view in your application to check users or derive user lists, how quaint!

Consider the use of lr_vuser_status_message("User Added") to assist you in your controller view to monitor the activities
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.