Key.HOME problem in Edge browser > version 40

Asked by Fabian on 2017-10-26

Hi guys,

I try to use the type(Key.HOME) in Edge browser and it is not taken in account whereas it works pretty well in Chrome, Firefox and IE11.
Do you experienced the same issue ? Is it a Sikuli limitation or an issue coming from Edge ?

Thanks in advance


Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
RaiMan (raimund-hocke) said : #1

Just tried: works.

Focus problem?

Just click somewhere in the page where it does not hurt and wait a second before the type.

my test ( in edge):

Fabian (fabian-ledoeuff) said : #2

Thanks for your answer !
But nope, focus is in the correct place.
I tried your workaround with a Key.END before the Key.HOME and still the same outcome.
FYI, Edge release is 40.15063.674.0 and Edge HTML is 15.15063
On which version have you made your test Raiman ?

Fabian (fabian-ledoeuff) said : #3

And I'm working with Sikuli 1.1.1

Fabian (fabian-ledoeuff) said : #4

And to give more details, it is working via input keyboard but not via Sikuli

Fabian (fabian-ledoeuff) said : #5

So I have made the test with an older version (38.14393.1066.0 and HTML 14.14393) and it works !
There must have a compatibility issue with the newer Edge release.
Anyway, thanks for your test Raiman, it leads me to make additional tests

RaiMan (raimund-hocke) said : #6

- I am on the same Edge

- If I simply scroll down the page a bit, and then start the script in the IDE having only the type(Key.HOME), it does not work.

- but if i use this:
click(); wait(1) # clicks somewhere in the page with no effect but focus

... then it works.

So it is indeed a focus problem, though it might be special for the non-human key-press situation.

Fabian (fabian-ledoeuff) said : #7

On my side, my test was inside a drop down and a click to open it was performed before the Key.HOME to be sure focus was inside it

RaiMan (raimund-hocke) said : #8

try a wait(1) after the click

Fabian (fabian-ledoeuff) said : #9

I also tested with the wait(1) and same issue

Best RaiMan (raimund-hocke) said : #10

ok, then it does not work.

Hope you find a workaround.

The problem itself is deep down in the Java layer towards Windows as seen from the Java Robot class and the key handling in there.
No chance to fix anything at the SikuliX level.

Fabian (fabian-ledoeuff) said : #11

Thanks RaiMan, that solved my question.