NullPointerException during a click with XYLocator

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

NullPointerException during a click with XYLocator

Postby Steffen8708 » Thu Nov 27, 2008 7:36 am

Hi,

the line

ui.click(new XYLocator(5, 5));

produces the exception:

Code: Select all
java.lang.NullPointerException
   at com.windowtester.runtime.swt.internal.UIContextSWT.findAll(UIContextSWT.java:633)
   at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:568)
   at com.windowtester.internal.runtime.selector.ClickHelper.doFind(ClickHelper.java:192)
   at com.windowtester.internal.runtime.selector.ClickHelper.click(ClickHelper.java:58)
   at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:82)
   at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:293)
   at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:75)
   at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:301)
   at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:68)
   at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:284)
   at mytest
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at junit.framework.TestCase.runTest(TestCase.java:154)
   at junit.framework.TestCase.runBare(TestCase.java:127)
   at com.windowtester.runtime.common.UITestCaseCommon.access$001(UITestCaseCommon.java:25)
   at com.windowtester.runtime.common.UITestCaseCommon$2.run(UITestCaseCommon.java:136)
   at com.windowtester.runtime.common.UITestCaseCommon$3.run(UITestCaseCommon.java:157)
   at com.windowtester.internal.runtime.junit.core.SequenceRunner$1.run(SequenceRunner.java:46)


Any ideas, why?

Steffen
Steffen8708
 
Posts: 29
Joined: Tue Nov 04, 2008 7:11 am

Re: NullPointerException during a click with XYLocator

Postby Steffen8708 » Thu Nov 27, 2008 8:12 am

There is also another issue with XYLocator. Assume the XYLocator gets as parent locator a TableItemLocator. The coordinates should then be relative to the table item, I think. But this is not the behavior. Instead, the coordinates are treated as relative to the parent table widget of the found table item.

Regards,
Steffen
Steffen8708
 
Posts: 29
Joined: Tue Nov 04, 2008 7:11 am

Re: NullPointerException during a click with XYLocator

Postby Phil Quitslund » Thu Dec 04, 2008 7:21 pm

Both of these issues look like bugs. At your convenience, could you submit reports to support? wintest-support@instantiations.com We can track the issues and fixes there.

Thanks!
--
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