-original message-
Subject: Re: Regarding absolute path .
From: Taranjot Singh <cmil...@gmail.com>
Date: 21/02/2012 9:16 pm
Save ur file in ur load runner script folder
On 21 Feb 2012 21:09, <venkates...@gmail.com> wrote:
> Hi, i have script to upload the document and i want to place this script
> in multiple systems. Now the prob is document path , for every machine i
> need to define a relative path . Can anyone tell me that how to make
> absolute path in loadrunner , so that script will take care about the
> document path ,
> Thanks in advance .
>
> --
> You received this message because you are subscribed to the Google
> "LoadRunner" group.
> To post to this group, send email to LR-Loa...@googlegroups.com
> To unsubscribe from this group, send email to
> LR-LoadRunne...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/LR-LoadRunner?hl=en
--
You received this message because you are subscribed to the Google "LoadRunner" group.
To post to this group, send email to LR-Loa...@googlegroups.com
To unsubscribe from this group, send email to
LR-LoadRunne...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/LR-LoadRunner?hl=en
--
-----
*Taranjot Singh*
If you are not changing the document for each run. Try attaching the
doc to the script.
--
Avinash N
i used the below script to make it absolute path..
Filepath()
{
#define DIR_LEN 512
char original_dir[DIR_LEN];
char fullpath[1024], * filename = "DocumentToUpload.doc";
if (!getcwd(original_dir, DIR_LEN)) {
//lr_output_message ("getcwd error");
return -1;
}
if (chdir(original_dir)) {
// lr_output_message ("Cannot move back to %s", original_dir);
return -1;
}
else
// lr_output_message ("Moved back to %s", original_dir);
strcpy(fullpath, original_dir);
strcat(fullpath, "\\");
strcat(fullpath, filename);
// lr_output_message ("Full path of file is %s", fullpath);
lr_save_string(lr_eval_string(fullpath),"lrp_Filepath");
lr_output_message("Document Path is:%s",lr_eval_string("{lrp_Filepath}"));
}
--
With Regards,
Venkatesh.T.Gowda
7760765757