[1.0.1] WinXP: type() not working at all

Bug #1409298 reported by GBLilleyUSMC
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SikuliX
Won't Fix
Undecided
Unassigned

Bug Description

I have just installed Sikuli on the 5th system in our company. We are using it to automate some tasks that have to be done every day exactly the same way and are easily enough scripted with Sikuli.

It is on this 5th and final system that I ran into trouble. There is nothing that I can tell which is different on this system than any other that I have installed it on previously. Windows XP 32 bit operating system. Java 7 installed, Python 2.74 installed, and Sikuli 1.0.1.

So now, on this one, the type() function does not seem to work at all. Any of the other visual functions seem to work perfectly. It is just this type() function I am having trouble with. The log in the IDE shows that the command was sent (example: [log]TYPE "www.google.com". Can anyone shed any light on this problem? I will be happy to provide any additional information that is requested. Thanks in advance.

Revision history for this message
RaiMan (raimund-hocke) wrote :

Are you saying, that nothing is typed at all (in this case into the address field of a browser)?

What about using paste() instead of type()?

summary: - type() not working at all
+ [1.0.1] WinXP: type() not working at all
Revision history for this message
GBLilleyUSMC (gblilleyusmc) wrote :

Yes, that is correct. type() does not work at all. For my script, I need a lot of other key commands too such as type("d", KEY_WIN) and type("r", KEY_WIN) and those are not working either. I do not even know where to start looking for a solution to this. Just updated my Java to 8 and type() is still not working.

Revision history for this message
GBLilleyUSMC (gblilleyusmc) wrote :

Just for good measure, I tried paste("www.google.com") and that did not work either.

Revision history for this message
GBLilleyUSMC (gblilleyusmc) wrote :

And, just reinstalled Sikuli. Same thing is happening.

Revision history for this message
RaiMan (raimund-hocke) wrote :

-- 1. has surely nothing to do with Java version. For 1.0.1 Java 7 is ok.

-- 2. If type() does not work at all, then paste() will not work either,
since internally it fills the clipboard and then issues a type("v", Key.CTRL)

-- 3. there have been various situations, where on Windows type() was blocked generally or within specific applications (the feature internally used is Java Robot class). Running the script as administrator in most of these situations helped.
So you might check your Windows setup about policies, that restrict then usage of virtual keyboard input (do not ask me, where to look for that, but you might have experts at hand)

Revision history for this message
GBLilleyUSMC (gblilleyusmc) wrote :

Thank you for the detailed reply. I am running as administrator, and after searching Google, I can't find any windows setting that might be preventing this. Hopefully someone who knows more will reply. Thank you RaiMan.

Revision history for this message
RaiMan (raimund-hocke) wrote :

Ok, WinXP does not yet have UAC: what I said applies to Win7 and 8, where you have an entry in the context menu "Run as administrator", that must be used in these cases no matter wether you are a user of type administrator or not.

Neverthrless, the symptom must be caused by some global blocking of Java Robot actions.

Revision history for this message
CHENG (waiche) wrote :

HI,

Currently, I encountered this issue
but I have a different solution :
- VM Jenkins slave which has the job, under Debian Wheezy
- VM with my targeted environment to test, under Windows 7 enterprise

Execution of Jenkins job :
- script shell to set/inject environment variables
- run vnc client (full screen mode) to connect to VM to test
- run robobot framework + sikuli script

All works fine, except type() command

As vnc client running in fullscreen mode, the keyboard is disabled by default

Just do the following steps in command line :

echo "Vncviewer*grabKeyboard:true">>~/.Xresources
xrdb -merge ~/.Xresources

And now, it works fine for type() command

Revision history for this message
Lee T Hall (lethall55) wrote :

No problems on my Mac; but a co-worker has Windows 8 and has very similar symptoms to what the reporter describes. What is odd is that the problem happens with v1.1.4 (and the version built from the dev-recorder branch); but does not have the problem with v1.1.3. He is using Java8.

He can find and click with no problems; but typing is logged successfully in Sikulix IDE (whether or not using a target image) even though the target app does not actually get any keypresses.

Revision history for this message
RaiMan (raimund-hocke) wrote :

@Lee
does not make sense, to add asking comments to ancient bugs.
No problem if you create new questions/bugs - I will manage.

Your problem:
This usually means, that on the system somehow the typing (done with Java AWT Robot) is blocked by some rules.

Try to run the stuff from an admin command line.

If it persists: create a question first with exact info about the system environment.

RaiMan (raimund-hocke)
Changed in sikuli:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.