Multiple Selection using Keyboard shortcuts

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 Selection using Keyboard shortcuts

Postby karthik.intels12 » Wed Apr 28, 2010 4:42 am

Hello,
I'm facing a problem with Multiple selection in table.. Instead of using XYLocator, i wanted to achieve multiple selection using keyboard shortcuts. But when i try using SHIFT key in windows tester, it is just recording arrow key selection alone. Shift Action itself cannot record by windows tester.

So i tried with manually i added that SHIFT function like this.

ui.keyClick(WT.SHIFT + WT.ARROW_DOWN + WT.SHIFT);
ui.keyClick(WT.SHIFT + WT.ARROW_DOWN + WT.SHIFT);
ui.keyClick(WT.SHIFT + WT.ARROW_DOWN + WT.SHIFT);



I have tried with lots of combination with shift. Nothing is working. even i tried this type of code.

ui.keyClick(WT.SHIFT | WT.ARROW_DOWN);

But No use boss.. it is only doing arrow key down function alone. So here i want to know What's going wrong. Whether WindowsTester or myself:-)
Thanks and Regards,
Karthik.M.S
karthik.intels12
 
Posts: 35
Joined: Wed Mar 31, 2010 4:37 am

Re: Multiple Selection using Keyboard shortcuts

Postby Phil Quitslund » Wed Apr 28, 2010 8:36 am

This may be a bug in our composite keystroke generation. What version of WT are you using?
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: Multiple Selection using Keyboard shortcuts

Postby karthik.intels12 » Thu Apr 29, 2010 7:11 pm

Hello,

Windows tester version details:-


Product: Window Tester SWT Professional
Version: 4.0.1.r35x200911191920.
Thanks and Regards,
Karthik.M.S
karthik.intels12
 
Posts: 35
Joined: Wed Mar 31, 2010 4:37 am

Re: Multiple Selection using Keyboard shortcuts

Postby Phil Quitslund » Mon May 03, 2010 8:27 am

Have you tried with our latest update? 5.0.1 can be fetched here:

http://www.instantiations.com/windowtester/download.html

Pick the latest build for your eclipse version. If the bug is still present there, we'll open a support ticket and schedule a fix.

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

Re: Multiple Selection using Keyboard shortcuts

Postby mbykovksyy » Mon Sep 20, 2010 9:06 am

I have a feeling this problem still exists in version 6.0.0.r34x201009131510 on Eclipse 3.4.2.

Here's a snippet from my test,

Code: Select all
      ui.wait(new ShellShowingCondition("Add New Device"));
      ui.click(new ButtonLocator("&Next >"));
      ui.click(new XYLocator(new SWTWidgetLocator(Text.class,
                  new LabeledLocator(TextComponent.class, "Device name")),
                  4, 6));
      ui.keyClick(WT.SHIFT | WT.END);
      ui.enterText("myDevice_183");


When I run the test I can see the cursor positioning the caret at the beginning of the text and then it jumps right to the end without highlighting the text. As if only WT.END is issued.
mbykovksyy
 
Posts: 8
Joined: Mon Sep 20, 2010 8:55 am

Re: Multiple Selection using Keyboard shortcuts

Postby karthik.intels12 » Wed Sep 22, 2010 1:21 am

Hello,

Any Solution or workaround for above query??? please let me knoe. It will be helpful for me.
Thanks and Regards,
Karthik.M.S
karthik.intels12
 
Posts: 35
Joined: Wed Mar 31, 2010 4:37 am

Re: Multiple Selection using Keyboard shortcuts

Postby mbykovksyy » Wed Sep 22, 2010 1:51 am

Unfortunately, I didn't find a solution but my workaround is to post a WT.DEL key a number of times.
mbykovksyy
 
Posts: 8
Joined: Mon Sep 20, 2010 8:55 am

Re: Multiple Selection using Keyboard shortcuts

Postby keertip » Fri Sep 24, 2010 10:04 am

On what platform do you see this problem? Windows or Linux?
keertip
Moderator
 
Posts: 221
Joined: Thu Mar 15, 2007 10:26 am

Re: Multiple Selection using Keyboard shortcuts

Postby mbykovksyy » Fri Sep 24, 2010 10:21 am

It's Windows XP with Java 1.6 update 14.
mbykovksyy
 
Posts: 8
Joined: Mon Sep 20, 2010 8:55 am

Re: Multiple Selection using Keyboard shortcuts

Postby keertip » Mon Sep 27, 2010 10:35 am

We are not seeing this problem at our end.
WT ver 6.0, eclipse 3.5, Windows platform

Could you try the attached JUnit Plug-in test and verify whether it passes or fails.
Attachments
TestShiftinEditor.java
(2.23 KiB) Downloaded 21 times
keertip
Moderator
 
Posts: 221
Joined: Thu Mar 15, 2007 10:26 am

Re: Multiple Selection using Keyboard shortcuts

Postby mbykovksyy » Tue Sep 28, 2010 8:49 am

The test failed. Here's a stack trace

Code: Select all
com.windowtester.runtime.WidgetNotFoundException: No tree items found for 'test' in
WrongNametest
   at com.windowtester.runtime.swt.internal.drivers.TreeDriver.getNextTreeItem(TreeDriver.java:168)
   at com.windowtester.runtime.swt.internal.drivers.TreeDriver.reveal(TreeDriver.java:77)
   at com.windowtester.runtime.swt.locator.TreeItemLocator.click(TreeItemLocator.java:213)
   at com.windowtester.internal.runtime.selector.ClickHelper.doClick(ClickHelper.java:172)
   at com.windowtester.internal.runtime.selector.ClickHelper.click(ClickHelper.java:59)
   at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:140)
   at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:325)
   at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:133)
   at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:333)
   at TestShiftinEditor.testTestShiftinEditor(TestShiftinEditor.java:46)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at junit.framework.TestCase.runTest(TestCase.java:164)
   at junit.framework.TestCase.runBare(TestCase.java:130)
   at com.windowtester.runtime.common.UITestCaseCommon.access$0(UITestCaseCommon.java:1)
   at com.windowtester.runtime.common.UITestCaseCommon$2.run(UITestCaseCommon.java:130)
   at com.windowtester.runtime.common.UITestCaseCommon$3.run(UITestCaseCommon.java:151)
   at com.windowtester.internal.runtime.junit.core.SequenceRunner$1.run(SequenceRunner.java:40)
mbykovksyy
 
Posts: 8
Joined: Mon Sep 20, 2010 8:55 am

Re: Multiple Selection using Keyboard shortcuts

Postby keertip » Wed Sep 29, 2010 2:03 pm

This is really puzzling. We have confirmed that it works on our end. Could you uninstall WindowTester, install a fresh copy and then try it?
keertip
Moderator
 
Posts: 221
Joined: Thu Mar 15, 2007 10:26 am

Re: Multiple Selection using Keyboard shortcuts

Postby mbykovksyy » Fri Oct 01, 2010 2:32 am

A fresh install of WindowTester on an old install of eclipse 3.4.2 - didn't work.
A fresh install of WindowTester on a fresh install of eclipse 3.4.2 - didn't work.
A fresh install of WindowTester on an old install of eclipse 3.6.0 - worked.

Have you tried running WT on eclipse 3.4.2? Could the problem be in language/keyboard settings?
mbykovksyy
 
Posts: 8
Joined: Mon Sep 20, 2010 8:55 am

Re: Multiple Selection using Keyboard shortcuts

Postby keertip » Fri Oct 01, 2010 7:05 am

Thanks for the update. Will check it out with eclipse 3.4.2.
keertip
Moderator
 
Posts: 221
Joined: Thu Mar 15, 2007 10:26 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest