kivech Posted August 21, 2014 Report Share Posted August 21, 2014 Hi all, First of all, I work in QA as a freelancer and I am using MEP to automate some of my test work on web sites. Great tool! Now I'm running into a challenge of which I am not sure how to approach it. Bear with me, I'm still rather new with this tool, so I might be missing the obvious. I cannot give you the exact details of what I am working on due to NDA in my work, but I'll try to give you the outline of what I have to accomplish. My macro has to select values in fields that vary depending upon previously selected values. e.g. At first I have the option to select values A, B and C. Once I select option A and save it, I also get the option to select option D. Then once I save option D, I can also select option E. So these are my options: A B C D (if A was saved first) E (if D was saved first) I have to deal with multiple records at once, based upon dates. When I save, I save all records at the same time. I cannot save one first, then the other, etc. I created an ASCII file with records of information for the dates I have to save. Per save I would be saving the whole set of one particular date. Example: date_1, A date_1, B date_1, E date_2, D date_2, A date_2, C etc. To achieve the values for date_1 I would first have to save: A B A Then go back through them and save the last A as D. Then go back again and save the D as an E. Due to the limitations of the ASCII file process loop (which only searches in a sequential manner) I have to either make multiple passes on the same file (tried that already, but takes far too much time to process), or I need to come up with an intelligent way to hold off processing values D and E, until I first finish the whole set of records, and then save them later. My first thought was to copy all values of the record to a temporary array/file when it runs into a D or E value, flag a boolean so that the macro does an extra pass on the saved records once it finishes all of them for the selected date. The other values should be available then, so that should work. However, I am not sure how to accomplish this in an efficient manner. My ideas so far: 1) Create a new file with the records pasted in there and process that file at the end of a date sequence. However, I have not found a way to do that with MEP. 2) Copy records to an array, though I am not sure how to do that. Copy value, then value etc. came to mind, but once done, I have not discovered a way to read record by record from an array. There is also no record pointer manipulation option, so I'm not sure how to go about this. The main issue is that I cannot let the ASCII loop finish first. I really have to run an IF statement with a REPEAT that should process all values within the ASCII loop. I hope I am still making sense to the lot of you. Basically I need a way to temporarily copy records to a file or an array, so that I can process them later, and repeat that X number of times. Any suggestions are most welcome. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.