Forum Discussion
sunsmile
15 years agoOccasional Contributor
Hi Alexei ,
Thanks for that information. I got the Logs uploaded to sharepoint using below code. I am posting the code for the benefit of the community. Please do let me know if there is scope for improvement. The code is in C#.
Thanks for that information. I got the Logs uploaded to sharepoint using below code. I am posting the code for the benefit of the community. Please do let me know if there is scope for improvement. The code is in C#.
function GeneralEvents_OnStopTest(Sender)
{
try
{
Log["SaveResultsAs"]("C:\\testcompleteLog.mht",2);
var objStream = Sys.OleObject("ADODB.Stream");
objStream["Type"]=1;
objStream["Open"]();
objStream["LoadFromFile"]("C:\\testcompleteLog.mht");
var sData = objStream["Read"]();
objStream["Close"]();
var strURL = "http://MySharepointwebsite/folder/subfolder/testcompleteLog.mht";
var httpObj = Sys.OleObject("MSXML2.XMLHTTP");
httpObj["open"]("PUT",strURL,false,"YourUserName","YourPassword");
httpObj["send"](sData);
}
catch(Exception)
{
Log["Error"]("Failed Upload Logs to Share Point " + Exception);
}
}
Related Content
- 2 years ago
- 2 years ago
- 2 years ago
Recent Discussions
- 5 days ago
- 5 days ago