Click with tab item locator does not work sometimes

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

Click with tab item locator does not work sometimes

Postby Steffen8708 » Mon Nov 02, 2009 4:31 am

Since upgraded from 3.6 to version 4.0, the (c)tab item clicks do not work sometimes (maybe one of three fail to click). Any idea why? No exception or assertion failure is thrown. No console output or error log is made.

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

Re: Click with tab item locator does not work sometimes

Postby Steffen8708 » Mon Nov 02, 2009 6:37 am

Another thing that is not working since the upgrade: TableItemLocator.isSelected fails although the corresponding screen capture shows the selected element!
Steffen8708
 
Posts: 29
Joined: Tue Nov 04, 2008 7:11 am

Re: Click with tab item locator does not work sometimes

Postby Steffen8708 » Mon Nov 02, 2009 6:38 am

By the way, I'm using Eclipse 3.2 and Jave 5.
Steffen8708
 
Posts: 29
Joined: Tue Nov 04, 2008 7:11 am

Re: Click with tab item locator does not work sometimes

Postby Phil Quitslund » Mon Nov 02, 2009 8:54 am

We are not seeing any regressions in our CTabItem tests. Could you help us characterize the issue? Does it happen in the same place? Could you post the snippet that is failing and tell us how it is failing? That is, is it failing to click? Is it failing to find?

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

Re: Click with tab item locator does not work sometimes

Postby Steffen8708 » Tue Nov 03, 2009 1:59 am

Unfortunately, I can't reproduce it specific to the problem mentioned. But it seems to be a more general problem that WT is somehow to fast with its clicks. I'm having the following situation: firstly, a click on the CTabItem of a view is made to activate it. Then immediately after that a double-click is made on a tree item in a tree contained in the view. Unexpectedly, this maximizes the view (I tried several times, always the same). And if I specify a playback delay for widget clicks of 100ms via preferences this issue does not occur. Any idea? Or is it normal to set such a delay?

Code: Select all
ui.click(new CTabItemLocator("Visualization"));
ui.click(2, new TreeItemLocator("Filters/" + filterName, new ViewLocator(
      UITestConstants.VISUALISATION_VIEW_ID)));


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

Re: Click with tab item locator does not work sometimes

Postby Phil Quitslund » Wed Nov 04, 2009 9:24 am

Interesting. It looks like the view is not totally materialized before we interact with it. A few things that might bullet-proof your test:

1. Try:

Code: Select all
ui.ensureThat(new ViewLocator(UITestConstants.VISUALISATION_VIEW_ID).isActive());
ui.click(2, new TreeItemLocator("Filters/" + filterName, new ViewLocator(
      UITestConstants.VISUALISATION_VIEW_ID)));


2. Or alternatively,
Code: Select all
ui.click(new CTabItemLocator("Visualization"));
ui.wait(new ViewLocator(UITestConstants.VISUALISATION_VIEW_ID).isActive());
ui.click(2, new TreeItemLocator("Filters/" + filterName, new ViewLocator(
      UITestConstants.VISUALISATION_VIEW_ID)));


Oh and BTW, what OS are you using?

Let us know how it goes!

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

Re: Click with tab item locator does not work sometimes

Postby Steffen8708 » Mon Nov 09, 2009 3:49 am

OS is Windows Server 2003. Using the Eclipse mechanism for activating the view does work (I think the ensureThat method does this, too?) for my problem.

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

Re: Click with tab item locator does not work sometimes

Postby Phil Quitslund » Mon Nov 09, 2009 5:49 am

Hi Steffen,

Yes, using a ViewLocator within an ensureThat, uses the same mechanism.

Does this get you unblocked?
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: Click with tab item locator does not work sometimes

Postby Steffen8708 » Tue Nov 10, 2009 12:15 am

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

Re: Click with tab item locator does not work sometimes

Postby Phil Quitslund » Wed Nov 11, 2009 8:24 pm

Great, thanks! Let us know if you have any other insights or have other issues.
--
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