Able to send mail for log data through script but confused in path for file location.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Able to send mail for log data through script but confused in path for file location.
I am executing test items and in the last of queue Email Test cases is there to send reports.
but problem is in Sendmail() function we need to provide parameter for file location. so this function will get that file and will send to respecttive userID.
My question is if I am providing file location details like "C:\Users\KO\Music\file1.mht"
then will it overide the log data here whenever I will execute my test items. if not then how i will be able to send my log data after test item execution.
Hope you get my point.
Please guide.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't understand what you want to do. Are you asking me:
1) The file you send to the disk will be deleted after you perform SendMail()?
2) Do you always want to take only the latest log file to sendMail()?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For these cases i built a path test\date based name and export to this path and i send mail the exported log.
The exported log contains also timestamp.
testexecute.mht -> exported to \results\myApp\03-19-2020\myAPP03-19-2020-100005.mht
But as @Wamboo i dunnot understand clearly what u want.
Un sourire et ça repart
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@BenoitB is correct.... you best practice would be to make sure that your MHT file has a unique name each time it's created. That will prevent over-writing/replacement.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
adding on to all of the other comments, I'd suggest using aqDateTime to get a timestamp (when you are initally creating these mht files) or using something lke ProjectSuite.TestItems.Current.ProjectName to get the relevant unique name for each of your runs.
Justin Kim
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you! Great suggestions everyone!
@kaiiii please mark the most helpful reply a as solution. Thank you!
Sonya Mihaljova
Community and Education Specialist
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@kaiiii please let us know if you found out how to solve this. This would really help people in the long run Thank you.
Sonya Mihaljova
Community and Education Specialist
