ContributionsMost RecentMost LikesSolutionsRe: Emailing Project LogCan somebody please reply to me!!!! Re: how to debug Exception during file read/writeHi Jared As I replied in my email, it was the problem of file pointers, not invalid filename or path. But what I was intrested was, is there a better way to find out, either by exception handling or some other technique to find out the exact exception which could save loads of time. Thanks, Mateen Re: Emailing Project LogHi Alex Thanks for the email. <<<< 2. Find TestRunSummary.xml >>>> Thanks for pointing this to me, however I dont think TestRunSummary.xml will be of any help to me, as all it gives is asummary. I'm rather looking for the list of testcases that ran (top level items) that ran along with their status pass or fail (just like/similar in the attachement of my original post). <<<< See the 'Built-In.SendMail' >>>> I already konw about the SendMail option, but that requires me to first generate the .MHT file and then attach it with the email (by giving the filename as a parameter to SendMail function. But my question is not exactly that. When I execute SendMail command, it sends the file as an attachment, but is there a way where I can send the just the list of top level items that ran, along with their status as part of the email's body rather than an attachement. <<<< 1. Export the needed log to HTML >>>> How can I export the needed log to HTML/MHT thru scripts? Log.SaveResultsAs() works only if there's a function and it drops only that particular function's(or test) log. How can I capture the whole testrun's log. Thanks, Mateen Re: Emailing Project LogAdding one more question to the above questions: When I right click on the master project log(from the log items list) , I get this option of "Send Via email", which will generate a MHT file and attach it to the Outlook email message. Now where do I find this .MHT file? Thanks, Mateen Emailing Project LogHi I'm trying to email results from a TestRun from daily testruns, but I don't want to email the whole .MHT file that gets generated at the end of each test run. Instead each TestRun has a project Log which has a nice summary of the tests that ran along with their status i.e pass or fail (check screen shot attached to get an idea of what exactly I'm talking about). How can I email this only this report instead of the whole master log. Also can I know how to send this email as part of the email body rather than an attachement? Thanks, Mateen how to debug Exception during file read/writeHi I'm having problem while trying to create a log file using the command Log.SaveResultsAs(path+fileName+".mht",2) Where path & fileName are dynamically generated. And I do understand if there's no Path (on the computer), TC/TE creates one. So the above piece of code used to work fine for me, over the past two months, but all of a sudden I dont see any log file being created, coz the above command returns a boolean false. The problem now is, I dont know what is causing the above function to return a False value, when the same thing was working earlier. If the code would have been returning an exception it would have been easy for me to debug what was causing the problem. How do I make the code to throw an exception with what is causing the problem? I had a similar problem couple of days back, I was trying to write a file, which was opened in read mode by some other function, and when the function ended, the filepointer wasn't closed, hence was causing trouble for the later function to open a write pointer. But as there was no exception being throw, it took me one whole day to debug what was causing the problem as all it returned was False. Thanks, Mateen Re: Create Log even though TestComplete fails executingHi Ahmed Thanks for the tip. Is there anyway I can find out from the event generated, I can find out more details about the event, like which test, which file, lineno threw the exception which caused TC to stop testexecution. Thanks, Mateen Create Log even though TestComplete fails executingHi I have created a custom log for my tests, coz 1) The default logs created by TC all have a prefix "Testrestults" and it becomes hard to identify by looking at their names. And sometimes they are overwritten. 2) I want all of them to go into a fixed folder for archiving. The way I do it is: [TestCase] function test1() { ..... CreateLog("test1"); } function CreateLog(testCaseName) { .... Log.SaveResultsAs(path+testCaseName+".mht",2); } The problem with this, whenever TestComplete ends execution abruptly due to an error, it never reaches the line "CreateLog("test1");" (which is expected). And as a result I dont get any logs. I even tried using try{}finally{} block around my testcase, but still it doesn't execute finally, rather simply quits without any log. What can I be doing wrong? Any suggestions? Thanks, Mateen Re: Disable TC/TE update dialog boxesThanks that helps :) Clear text before doing Send KeysHi I am trying to edit a textbox. At first I used testObj.wText property to set text on the textbox. But I had to move to testObj.SendKeys() method as wText didnt work on all platforms, due to user privilege. The problem I am facing with SendKeys is, it doesn't clear any existing text before sending text to the textbox. It always starts typing from position 0 (i.e beginning). 1) Is the above behaviour expected? 2) How can I clear existing text of the textbox, before sending in keystrokes? I tried testObj.Keys("[Clear]"); method, but it didn't help me much. Thanks, Mateen