Multiple key constants for modifier mask of keyKlick - bug?

WindowTester allows you to easily create and run unit tests for every GUI they build. It can also be used to generate system level tests.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund

Multiple key constants for modifier mask of keyKlick - bug?

Postby alexfr » Tue Jul 17, 2007 8:29 am

Hi!

There still exists a problem with enterText concerning international keyboard support which has already been pointed out in this thread http://www.instantiations.com/forum/viewtopic.php?t=927&highlight=numeric.

We tried to create a workaround using keyClick to press the corresponding key(s) for every "non standard" character of the string to be entered, e.g.
Code: Select all
ui.keyClick(WT.SHIFT, '1');

presses the exclamation mark '!' on a German keyboard.
Unfortunately some characters like '~' need to be accessed using the AltGr key which is equivalent to Ctrl+Alt.
More unfortunately this
Code: Select all
ui.keyClick(WT.CTRL | WT.ALT, '+');

does not work! WindowTester still hits '+' only.

So what's wrong with this? Do I need a workaround for our workaround? ;)

Here is an overview about the German keyboard layout: http://carbon.cudenver.edu/~tphillip/GermanKeyboardLayout.html

Regards
Alex
alexfr
 
Posts: 4
Joined: Tue Jul 17, 2007 7:30 am

Postby alexfr » Wed Jul 18, 2007 6:27 am

Ok, I've found a quick workaround using Abbot.
Here is an example of pressing the right brace '}' on a German keyboard:

Code: Select all
abbot.swt.Robot abbotRobot = new abbot.swt.Robot();

abbotRobot.keyPress(SWT.CTRL | SWT.ALT);
ui.keyClick('0');
abbotRobot.keyRelease(SWT.CTRL | SWT.ALT);


Unfortunately, even with this method there still exists the drawback that neither the tilde character '~' nor the pipe character '|' are typed in, i.e. nothing is typed in.

Regards
Alex
alexfr
 
Posts: 4
Joined: Tue Jul 17, 2007 7:30 am

Postby Phil Quitslund » Wed Jul 18, 2007 8:17 pm

This definitely a bug; "composite" keyStrokes should work. Thanks for the catch! We expect to have a fix for a new beta to be released next week. If you'd like to get notified when the beta is out, please send mail to:

wintest-support@instantiations.com

Again thanks!

-phil
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Postby Phil Quitslund » Sun Sep 02, 2007 4:16 pm

Composite key-strokes should now be fixed.

Please let us know if you see any issues.

Thanks!
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: Multiple key constants for modifier mask of keyKlick - bug?

Postby amadas » Wed Feb 13, 2008 8:22 pm

Can you check if this thing works:

It does not work for me:

ui.keyClick(WT.END);
ui.keyClick(WT.SHIFT | WT.HOME, '+');
ui.keyClick(WT.DEL);

It still types a '+' char

All i am trying to do is to delete the existing text content in the text field and type in a new content.

After i click (setFocus()) on the text input, i try the above things to failure
amadas
 
Posts: 2
Joined: Tue Oct 09, 2007 1:37 am

Re: Multiple key constants for modifier mask of keyKlick - bug?

Postby amadas » Wed Feb 13, 2008 9:19 pm

BTW, i am using WT 2.3 on linux with Eclipse 3.3
amadas
 
Posts: 2
Joined: Tue Oct 09, 2007 1:37 am

Re: Multiple key constants for modifier mask of keyKlick - bug?

Postby Phil Quitslund » Thu Feb 14, 2008 10:01 am

Does the text field support a context menu? If so, does it have a "Select All" option?

Also, you might try one of our more recent 2.3.1 betas. Lots of fixes have gone in since the 2.3.0 release.

Keep us posted!
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest