Key strokes

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

Key strokes

Postby mwa » Fri Jun 27, 2008 5:39 am

Hello,

is there a way to press CTRL+HOME?

ui.click(SWT.CTRL, SWT.HOME) does not work. Perhaps I can define a shortcut with only one char for this purpose. But then the tests wouldnt work on other systems. Can a shortcut be defined automatically?

Michael
mwa
 
Posts: 24
Joined: Mon Jun 16, 2008 4:38 am

Re: Key strokes

Postby Phil Quitslund » Fri Jun 27, 2008 8:00 am

How about?:

Code: Select all
  ui.keyClick(SWT.CTRL | SWT.HOME);


If this does not work, please submit a feature request to WT support and we'll see to it.

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

Re: Key strokes

Postby mwa » Mon Jun 30, 2008 1:27 am

Yes! That works. Thanks! Would be great if you could write this in the API-Docs, too.

Michael
mwa
 
Posts: 24
Joined: Mon Jun 16, 2008 4:38 am

Re: Key strokes

Postby Phil Quitslund » Mon Jun 30, 2008 8:24 am

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

Re: Key strokes

Postby Phil Quitslund » Fri Jul 18, 2008 10:28 am

The docs have been updated in our latest beta.

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

Re: Key strokes

Postby mwa » Wed Oct 15, 2008 2:53 am

Hello,

again I can not figure out how to do a selection of text with SHIFT+ARROW_RIGHT:
Code: Select all
   ui.keyClick(SWT.SHIFT | SWT.ARROW_RIGHT);

The code behaves like only ARROW_RIGHT is clicked without holding shift. Is this the correct way of doing it?

Michael
mwa
 
Posts: 24
Joined: Mon Jun 16, 2008 4:38 am

Re: Key strokes

Postby Phil Quitslund » Wed Oct 15, 2008 2:27 pm

Hmmmm.... That *should* work.

Please submit a bug report. We'll create a local repro test case and see to a fix.

Thanks for the catch!
--
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