I need to figure out how to find an image that will change each day.
The folder that I need is auto created and is “today’s date”…
aka - 2009-10-15
I know that I can generate a text image - but is there a way to have eggplant determine the date and then auto generate that date as my folder?
I am new to code -but am learning
so any detail about how and why would be most helpful.
thanks for any help -
I am working on both mac and windows… version 3 - but can upgrade to 10 if needed.
Eggplant has many functions with regards to dates. today is a pre-defined container that contains today’s date. You can access the properties of the date (the day, month, year, etc) in this way:
put today's day #=> 15
So you can string this into a name the way you want, by putting the parts of the date that you want to use into a list and using the joined by command:
put (today's year, today's month, today's day) joined by "-" into folderName #=> "2009-10-15"
Then you should be able to script your SUT to create or recognize the folder.
As far as I know this should work in v3. I’m sure STDoug will pop in if that’s incorrect.
I highly recommend reading Working With Dates and Times in the SenseTalk Reference in the Eggplant help. Also, don’t hesitate to ask if anything I said was unclear.