Contributions
Re: Store/Save the Log results to a different location
Hi there, Not sure why you need a new feature for this?You can try using aqFile.Move(). We keep the log file as is and then simply export it to a central location like this for example: var outFileName; var filename = aqConvert.DateTimeToFormatStr(aqDateTime.Now(),"%Y%m%d_%H%M"); Log.Event("Converting output to mht..."); outFileName = Project.ConfigPath + "Log\\" + filename + ".mht"; Log.Message(outFileName); Log.SaveResultsAs(outFileName, 2); //converts output to mht if(aqFile.Exists("q:\\automation\\run_output\\" + filename + ".mht")){ aqFile.Delete("q:\\automation\\run_output\\" + filename + ".mht"); } //Copy the file elsewhere if(aqFile.Move(outFileName, "q:\\automation\\run_output\\" + filename + ".mht")){ Log.Message("File moved"); } else { Log.Warning("File was not moved!"); } Hope this helps somewhat6KViews0likes0CommentsRe: Need to capture toast message which changes frequently
Hi there, Please have a look at your Object Browser. In there you will see a "Mobile" parent node with a "Device" child node. Inside the "Device" node you will find the "Process" node. Select this node and have a look at the "ProcessName" property. This is the value you must use to address your process. var android_process = Aliases.Device.Process(<process_name>);2.1KViews0likes1CommentRe: Need to capture toast message which changes frequently
Hi there, It may have been mentioned in a previous post, but you should have a look at the "WaitForControlWithText" function. Even though your text for your toast is changing, surely this is expected for you test scenario and thus you can look for it :) Have a look below, try it out and see if it works for you. //JScript function getToast(){ var android_process = Aliases.Device.Process("com.android.qa"); //Returns boolean value (true = found) if(android_process.WaitForControlWithText("toast_text","1000")){ //Do something if the text was found } else { //Do something if the toast was not found } }2.1KViews0likes3Comments- 1.3KViews0likes0Comments
start time node in Description.tcLog
Hi there, Does anybody perhaps know how to convert the "start time" nodes' value (in the Description.tclog file) to a human readable form? Currently it's something like: <Prp name="start time" type="D" value="41983.5217424306"/> It would be handy to know how this value is built up and how to convert it to something in the format of %Y%m%d%H%M I've tried something likenew Date().getTime() to get the currentTimeMillisbut that does not have the desired effect (and is also completely different). Thanks! AltusSolved1.5KViews0likes3Comments