Contributions
- 2.6KViews0likes0Comments
Re: how to debug Exception during file read/write
Hi 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, Mateen1.1KViews0likes0CommentsRe: Emailing Project Log
Hi Alex Thanks for the email. <<<< 2. Find TestRunSummary.xml >>>> Thanks for pointing this to me, however I dontthinkTestRunSummary.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, Mateen2.6KViews0likes0CommentsRe: Emailing Project Log
Adding 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, Mateen2.6KViews0likes0CommentsEmailing Project Log
Hi 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 attachedto 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, Mateen20KViews0likes11Commentshow to debug Exception during file read/write
Hi 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 meone whole dayto debug what was causing the problem asall it returned was False. Thanks, Mateen14KViews0likes3CommentsRe: Create Log even though TestComplete fails executing
Hi 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, Mateen1.6KViews0likes0CommentsCreate Log even though TestComplete fails executing
Hi 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, Mateen11KViews0likes3Comments- 1.4KViews0likes0Comments
Clear text before doing Send Keys
Hi 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 userprivilege. The problem I am facing with SendKeys is, it doesn't clear any existing text before sending text to the textbox. It alwaysstartstyping from position 0 (i.ebeginning). 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, Mateen28KViews0likes9Comments