ContributionsMost RecentMost LikesSolutionsLog.SaveResultas do not save the report in the same pattern as we save it manually. Hi All, I am manually saving the report by clicking Exportto and saving it in HTML format I see that i have my test results in format of Root.xml, TestRunSummary.xml etc. But when i save the log file using log.SaveResultAs(filename,IsHTML) the test results are not being saved in the format as Exportto do. Can anybody please help me out with it. Thanks AnkitaMonitoring the Battrey during Test Execution in Android phones Hi All, I was planning to monitor the battery on an Android phone when my Testcases are being executed. Any body have an idea how to go about it. Does Andoird Android provide packages/tools which has to be called from Test Complete. Please pur in your views if any body has done this task. Thanks AnkitaRe: Send Email fucntion do not send emailsThanks Trung for Reply. I was trying to execute your code and i See that int he first command it gives a compilation error. I tried placing import email.message command in the first line, but still the issue continues. Any idea on it How can we integrate SVN with TestComplete Hi All, I have few queries regrading the SVN Integration with Test Complete: a. Can we have the SVN Tntegrated with Test Complete. The following link gives me the answer, but I am not able to succeed doing it: http://support.smartbear.com/viewarticle/29318/ b. Can we integrate Test Complete with SVN where we can directly run the checked-in code code from the Test Complete. Thanks Ankita Re: Send Email fucntion do not send emails Thanks for the Reply Trung. But i was looking for sending an email from Outlook and not from gmail. Can you please confirm if the following code will send email from Outlook Calling a VBscript with extension .vbs from Test Complete code Hi All, I am struggling hard but I have not got any clue on how to call a VB file from test complete. Any body have any idea please help me out on it. Thanks AnkitaSolvedSend Email fucntion do not send emails Hi All, I am not able to send emails using the script below, Where as my log shows as mail has been sent. Please look into this piece of code and let me know why it doesnot work. Sub Main 'call Test Call SendEmail("ankita_shama@xyz.com", "ritu_Pur@xyz.com", "Test", "TestMessage using script", "") End Sub Function SendEmail(mFrom, mTo, mSubject, mBody, mAttachment) Dim smtpServer, smtpPort, userLogin, userPassword Dim authenticationType, useSSL, connectionTimeout Dim schema, mConfig, mMessage smtpServer = "mailwestcoast.corp.nai.cum.org" smtpPort = 25 userLogin = "ankita_shama@xyz.com" ' e.g. "abc" if the address is abc@gmail.com userPassword = "pwrd" authenticationType = 1 ' cdoBasic connectionTimeout = 30 ' Required by Gmail useSSL = True Err.Clear() On Error Resume Next schema = "http://schemas.microsoft.com/cdo/configuration/" Set mConfig = Sys.OleObject("CDO.Configuration") mConfig.Fields.Item(schema & "sendusing") = 2 ' cdoSendUsingPort mConfig.Fields.Item(schema & "smtpserver") = smtpServer mConfig.Fields.Item(schema & "smtpserverport") = smtpPort mConfig.Fields.Item(schema & "sendusername") = userLogin mConfig.Fields.Item(schema & "sendpassword") = userPassword mConfig.Fields.Item(schema & "smtpauthenticate") = authenticationType mConfig.Fields.Item(schema & "smtpusessl") = useSSL mConfig.Fields.Item(schema & "smtpconnectiontimeout") = connectionTimeout mConfig.Fields.Update() Set mMessage = Sys.OleObject("CDO.Message") Set mMessage.Configuration = mConfig mMessage.From = mFrom mMessage.To = mTo mMessage.Subject = mSubject mMessage.HTMLBody = mBody If 0 < Len(mAttachment) Then mMessage.AddAttachment(mAttachment) End If mMessage.Send() If Err.Number > 0 Then Call Log.Error("E-mail cannot be sent", Err.Description) SendEMail = False Err.Clear() Else Log.Message("Message to <" & mTo & "> was successfully sent") SendEMail = True End If End Function Log.SaveResultas(aPath, IsHTML) doesnot generate a file which have Pass, Fail Status.Hi All, I was actually trying to extract the Pass, Fail Status from the Resutl file which is failed. I used the following code: 'Export logfile Dim aPath aPath = "D:\Results\" Call Log.SaveResultsAs(aPath, IsHTML) But the files which are saved have only pictures and few files but none of the files have the Pass , Fail information. Can anybody please guide me in order to extract the information of Pass, Fail TCs which command should I use. I tried using Log.SaveResultsAs(aPath, IsMHT) but it was of no use. Reading the logitems generated from Log.SaveResultsAs Method in VBscriptingHi All, I am trying to read the logitems which is generated from the Log.SaveResultsAs Method. My intention is to get the Pass, Failed, and Error Items from the logfile. I found this piece of code from the Smartbear utility scripts: But i am not able to run this code. Please help me on it I get error on the following line: tempFolder = aqEnvironment.GetEnvironmentVariable("temp") & "\" &_ GetTickCount() & "\" Sub Test() Call Log.Message("Current log items are in the Additional Information panel", GetLogItems()) End Sub Function GetLogItems() Dim tempFolder, xDoc, result tempFolder = aqEnvironment.GetEnvironmentVariable("temp") & "\" &_ GetTickCount() & "\" If 0 <> aqFileSystem.CreateFolder(tempFolder) Then Log.Error("The " & tempFolder & " temp folder was not created") GetLogItems = "" Exit Function End If If Not Log.SaveResultsAs(tempFolder, lsHTML) Then Log.Error("Log was not exported to the " & tempFolder & " temp folder") GetLogItems = "" Exit Function End If Set xDoc = Sys.OleObject("MSXML2.DOMDocument.4.0") xDoc.load(tempFolder & "root.xml") result = LogDataToText(xDoc.childNodes.item(1), 0, " ") Call aqFileSystem.DeleteFolder(tempFolder, True) GetLogItems = result End Function Function LogDataToText(logData, indentIndex, indentSymbol) Dim i, result If "LogData" <> logData.nodeName Then LogDataToText = "" Exit Function End If result = "" For i = 0 To indentIndex - 1 result = result & indentSymbol Next result = result & "Name: " & logData.getAttribute("name") & ", status: " &_ GetTextOfStatus(logData.getAttribute("status")) & vbCrLf For i = 0 To logData.childNodes.length - 1 result = result & LogDataToText(logData.childNodes.item(i),_ indentIndex + 1, indentSymbol) Next LogDataToText = result End Function Function GetTextOfStatus(statusIndex) Select Case statusIndex Case "0" GetTextOfStatus = "OK" Case "1" GetTextOfStatus = "WARNING" Case "2" GetTextOfStatus = "FAILED" Case Else GetTextOfStatus = "UNDEFINED" End Select End Function Thank You.