I’m trying to modify the logfile.txt generated by eggplant at the end of the execution. In the logfile, i want to delete the entries with “click”, “tap” and “imagefound” actions. Below is the code:
--I have placed the logfile.txt in my desktop at the moment put file "C:\Users\320340\Desktop\LogFile.txt" into inData repeat with each line x of inData put x into tempData replace every occurrence of tab in x with " ~ " if x contains " ~ click ~ " then delete tempData in inData else if x contains " ~ tap ~ " then delete tempData in inData else if x contains " ~ imagefound ~ " then delete tempData in inData end if end repeat put inData into file "C:\Users\320340\Desktop\NewLogFile.txt"
With this code, i’m able to generate the desired output logfile but it comes along with empty blank lines inbetween as a result of the line deletions. Tried different ways to remove these blank lines as per instructions in the different posts in the forum. However, I’m yet to reach a resolution.
Can you please help with this. Thanks.