Inserting the current system date into a text field

Asked by David Lafferty

Hi,
I'm a novice user of Sikuli so apologies if this is an obvious answer.
I'm using Sikuli to automate testing of an application that has various controls: Combo Boxes, Text Fields etc..
I wish to enter into a particular textfield the current system Date&Time so that it will be a different input each time the application is fired.
I was thinking it might have been something on the lines of : Type("Field", Calander.getInstance().getTime())
However this obviously is not recognised within the Sikuli IDE.
I've also attempted to write the Sikuli Script from within an Eclipse Java environment, however hit stumbling blocks as I'm unsure how to specify particular locations on an image to click once the whole image is found.
For now if the Date&Time input can be resolved within Sikuli please could someone assist me with this. Otherwise maybe assist with the "Target Offset" with the Image within an Eclipse environment....

Thanking you,
Dave

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
David Lafferty
Solved:
Last query:
Last reply:
Revision history for this message
David Lafferty (david-lafferty) said :
#1

*Edit forget the Target Offset issue, I think I maybe able to resolve that one myself. Still clueless to the System Date&Time text input...

Revision history for this message
David Lafferty (david-lafferty) said :
#2

Don't you just hate these noobs who sweep into a forum without reading a few of the already answered issues!
Sorry guys, don't hate me I'm new.
I've sorted it myself with the: time.strftime("%Y/%m/%d") method.

Thanks anyway!

Revision history for this message
David Lafferty (david-lafferty) said :
#3

Don't you just hate these noobs who sweep into a forum without reading a few of the already answered issues!
Sorry guys, don't hate me I'm new.
I've sorted it myself with the: time.strftime("%Y/%m/%d") method.

Thanks anyway!

Revision history for this message
RaiMan (raimund-hocke) said :
#4

Hi David,

do not have any remorse about asking anything about Sikuli and its usage.

The patience here has a name: RaiMan (you guess it - it's me ;-)

Sometimes I'am only a bit disappointed, if people do not react at all on my comments.

And I am a bit more cold-hearted against people, that want me to do their work (brain- and scripting-).

I love people, who know, that there are some docs available and are willing and able to talk about their challenges in sufficient detail.

In this sense, congratulations to your commendable behavior.

Do not hesitate, to come back and ask your questions.

Revision history for this message
David Lafferty (david-lafferty) said :
#5

Thanks alot for that RaiMan!
Often posts get lost in forums, especially when it is people asking for help!
I'm sure I'll be back at some point, possibly to enquire about integrating the sikuli scripts with JUnits however that's one for further down the road and yes I will read over all the documentation and any questions posed here.
Thanks again,
David