Can not trigger key pressed events for non printable characters #33

Open
adiroiban opened this Issue Apr 29, 2010 · 2 comments

Comments

Projects
None yet
2 participants
@adiroiban

Hi,

I'm trying to trigger a keyboard navigation key event (up, down, left, right) in an textarea
I'm calling this method:
self.client.keyPress(id=text_area_id, options='37,true,false,false,false,false')
And instead of moving the cursor, the "%" character is pressed.

Is this a bug or a feature?

Am I doing something wrong?

Are there other ways of generating keypress events using the Windmill API ?

Many thanks!

@admc

This comment has been minimized.

Show comment Hide comment
@admc

admc Apr 30, 2010

Collaborator

I spent about an hour trying to debug this, it turns out that I can't successfully trigger the arrow keys with javascript at all.

In firefox I was testing using initKeyEvent, my googling didn't turn up in the way of useful examples. Currently the windmill keypress action is missing a charcode option, which I will be checking into trunk:

now the options are as such: 39,true,false,false,false,false,0 with 0 being the charcode that should make this work.

Will continue investigating, if anyone can simulate this with raw JS it would really help.

Adam

Collaborator

admc commented Apr 30, 2010

I spent about an hour trying to debug this, it turns out that I can't successfully trigger the arrow keys with javascript at all.

In firefox I was testing using initKeyEvent, my googling didn't turn up in the way of useful examples. Currently the windmill keypress action is missing a charcode option, which I will be checking into trunk:

now the options are as such: 39,true,false,false,false,false,0 with 0 being the charcode that should make this work.

Will continue investigating, if anyone can simulate this with raw JS it would really help.

Adam

@admc

This comment has been minimized.

Show comment Hide comment
@admc

admc Jul 27, 2010

Collaborator

Looks like Selenium uses a nativeKeypress which does a bunch of OS level magic to trigger the events... we may need to do something like that :-(

Collaborator

admc commented Jul 27, 2010

Looks like Selenium uses a nativeKeypress which does a bunch of OS level magic to trigger the events... we may need to do something like that :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment