Unable to clear the text field using sikuli

Asked by kavitha

I want to clear the text field in emulator which is already typed by other user.

I have tried the below command but its not working

click("the-GUI-text-field.png")
type("a", KeyModifier.CTRL) # select all text
type(Key.BACKSPACE) # delete selection

getting a below error

NameError: name 'KeyModifier' is not defined

Question information

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

You need Sikuli X-1.0rc3, if you want to use the KeyModifier class.

In the versions before it was KEY_CTRL.

Can you help with this problem?

Provide an answer of your own, or ask kavitha for more information if necessary.

To post a message you must log in.