New Member.

Encountering error to attach and upload file in truclient protocol

I like to upload the file in one of the fuctionality, while recording the script it recorded the path from desktop. 

While execute the test from the performance center script may fail since the similar path and file is not available on performance center LG. I cann't create a folder and paste files in LG since I don't access to LG machine. 

While searching on the internet I found option is

1. Add file to script folder

2. attach file to extra files of the script: While perform this noticed Xred icon on file icon, is this refer to any error      in attachement process?

3. Utils.import(TC.scriptDir + "\Doc_10MB.jpg"); use that in set path.

Encountering API_ERROR_INVALIDARGUMENTSRUNTIME: Utils.import("UnderfindDoc_10MB.jpg") APIError: Invalid_path during evaluation.


Below microfocus link says to contact software support. 



Any suggestions on this. 

1 Reply
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Encountering error to attach and upload file in truclient protocol

Check out Javascript strings for details. Try to use a forward slash i.s.o backward. Note: in all APIs you can use forward slashes for file names. The backward slashes are only needed for cmd.exe (and batch files etc).

BUT, also note that on the examples page of TruClient Functions, 'TC.scriptDir' is assumed to end with a '\' or '/', so no need to add your own. This is explicitly stated on TruClient Properties page for 'LR.outputDir' (See also Caution remark at top of page).

Reward community members who take time to respond and help.
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.