Dought regarding TYPE option(Keybard Action) in Sikuli

Asked by Santhosh Motamarry

Hi,

I Need a clarification regarding TYPE Keyboard Action in Sikuli.

In Sikuli whatever we write in the braces of type option it will be displayed.
eg: type("santhosh") it will type(&display) santhosh

here my question is there any condition that with out giving any sort of letters in type event can i directly type the letter using original keyboard while running the application.
like e: I am creating a new contact in iphone simulator using sikuli tool. now instead of writing the event type with a particular name, can i have any condition to type any name in creating a contact while the application is running.

Eg:

if i write type("santhosh") to create santhosh contact it will directly create it. but if i need to create another contact again i need to write type option (OR)

is there any condition that we can type the name directly in Sikuli while the application is running.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

If I understand you right, you might either use:

# gives the name to the script and types it for you
name = input("give me the name")
type(name)

or
# the script waits, while you are typing the name yourself
popup("type the name, come back and click ok")

Revision history for this message
Santhosh Motamarry (santhosh-motamarry) said :
#2

Thanks Raiman,

i Got the answer but i have another question on this can we use this for validating email id and password.

eg: i have given username, now i need to give password with some conditions like password should be the combination of one upper case letter one lower case letter one numeric letter and one special character.

can u please let me know how can we do this

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

so look at your other question pls.

Revision history for this message
Santhosh Motamarry (santhosh-motamarry) said :
#4

Thanks Raiman I got the answer here i have a dought for password what we are typing we need to hide it like letters should display in dots or in stars format. how can we do it.

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

Usually, this is a feature, that is implemented by the receiving text field.

If you are talking about the input() feature of Sikuli:
Sorry, no. not implemented yet.

If you need that, you have to implement it on your own using Java features, that can easily be used in Sikuli scripts (which is Jython).

Revision history for this message
Santhosh Motamarry (santhosh-motamarry) said :
#6

thanks raiman

Revision history for this message
Santhosh Motamarry (santhosh-motamarry) said :
#7

Thanks RaiMan, that solved my question.