Date Formatting of Date Entry

Am new to Eggplant, and trying to enter data into an SUT ‘data entry field’ as a step in my script. Specifically, I want to add a text phrase and the date, with the date formatted as MMDDYY, no slashes.

Example: TestSN022124

Every time I try to add the format into the Type Text line, it fails. Tried:

set to "%MM%DD%YY"
TypeText "TestSN", the date



Still has slashes. Please help!

This should work for you:

Put "TestSN"&(formattedtime("[mo][da][yr]",the date)) into myDateString
TypeText myDateString

Hey @SnakeDoctor,

your set line is missing the before timeformat. It is a global property. Updated the string for the date/time format as well.

This works for me

put the # [mo]/[da]/[yr]
put the date #02/22/24
set the to "[mo][da][yr]"
put the date # 022224


That’s perfect!


I having trouble finding good information on ‘structuring’ the scripts, I find bits of an overall line, but nothing on to assemble it into an actual, complete line or command or whatever.

Any suggestions so my highly inexperienced self does not have to bother y’all experts with silly rookie questions like that one?

Thanks, again!

Good morning, Karsten!

I think they just mark where the string ends and a note/example begins, but I’m not sure - so, what does the ‘#’ represent?

(Yes, I am THAT much of a rookie at this… LOL)

Hey @SnakeDoctor,

Here are some resources to start with:

  1. Use our online Training portal. Here you can find out to register
  2. Best Practices | for how to setup your projects I
  3. Basic Sensetalk scripts and functions. (I consult them myself … daily :wink: )
  4. The suites for it on github
  5. # is used to start a comment. you can also use – or //

Do not hesitate to come back with more questions.


1 Like

Awesome! Thank you, Karsten! Oh, and be careful what you ask for! LOL

Um, so is there a way to adjust the screen size of the Connect window? When I run my script to initially connect to the SUT, the window does not open full screen.

I could just take a capture of the ‘Min/Max’ button and have Eggplant click it, but would think there is a way that’s a little more graceful…

Not 100% sure what you mean. Here are options its none of them fit. Kindly ask you to elaborate a bit more.

  • You can maximize any window on windows with typetext windowskey, uparrow
  • in case you mean the windows that is opened by Eggplant after connecting the SUT (system under test). Namely the Viewer Window. It remembers its size and position from last time
  • if you cannot see all the content of the SUT click “Scale to fit” if it shows “show Full Size” its fine.

As mentioned not sure what exactly you are refering too. :slight_smile:
Hope one of the above is the answer to your question.


My apologies. I believe I mean the window opened by Eggplant to connect to the SUT. I have adjusted it to full screen manually several times after it is open, but it never remembers.

Try it manually by the arrow that come when you are close to an edge/corner. Not sure why we aren’t remembering the maximised state.
This way it should remember it.

It’s still not working. So, I tried scripting it:
using the keyboard shortcut keys, and that doesn’t work - in the script - it does work on the actual keyboard…

I think I confused you know.

Typetext command will be sent to the SUT.

You cannot maximize the EPF Windows Viewer via EPF. At least not directly with any available command in EPF

Your Script:
after the connect add a

waitfor 30, image:"WindowsIcon" -- make sure you have capture this. use the icon in the bottom left corner. 

The quotes around upArrow aren’t correct. UpArrow is a keyboard
this should be it.

typetext Windowskey, uparrow

after waitfor 30, "chrome.png. you can also write:

Click foundimagelocation() -- this will click the location of the last search