.hasFocus() Used for Tool Items and Section's Titles

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

.hasFocus() Used for Tool Items and Section's Titles

Postby goksel » Thu Mar 17, 2011 5:02 am

Hello,
one sort of test cases we write for our application is for testing the tab order.
For this I start at a widget, press the tabulator key (WT.TAB) and check if the widget I expect now has the focus.
Some sample code looks like this:
Code: Select all
...
ui.click(new NamedWidgetLocator("NAME_WORK_SCHEDULE_VIEW_TXT_SEARCH_REGION_COUNTRY"));
ui.assertThat(new NamedWidgetLocator("NAME_WORK_SCHEDULE_VIEW_TXT_SEARCH_REGION_COUNTRY").hasFocus());
ui.keyClick(WT.TAB);
ui.assertThat(new NamedWidgetLocator("NAME_WORK_SCHEDULE_VIEW_TXT_SEARCH_REGION_ZIP").hasFocus());
ui.keyClick(WT.TAB);
ui.assertThat(new NamedWidgetLocator("NAME_WORK_SCHEDULE_VIEW_TXT_SEARCH_REGION_STREET").hasFocus());
ui.keyClick(WT.TAB);
...

This works fine with buttons or text widgets, but with tool items and section titles I get a timeout exception.
Code: Select all
...
ui.keyClick(WT.TAB);
ui.assertThat(new NamedWidgetLocator("NAME_WORK_SCHEDULE_VIEW_TI_SAVE_WORK_SCHEDULE").hasFocus());
ui.keyClick(WT.TAB);
ui.assertThat(new NamedWidgetLocator("NAME_WORK_SCHEDULE_VIEW_LBL_SEARCH_WORKGROUP").hasFocus());
...

For both assertions I get a timeout exception.

Could you please tell me if there are any known restrictions?
Is there maybe another way to do tests like this?
Do you know if other widget types are also not supported?

Thanks in advance for helping!

Cheers,
Göksel
goksel
 
Posts: 17
Joined: Thu Nov 25, 2010 7:13 am

Re: .hasFocus() Used for Tool Items and Section's Titles

Postby goksel » Mon Mar 21, 2011 11:56 pm

Anybody out there who can help?
Thanks,
Göksel
goksel
 
Posts: 17
Joined: Thu Nov 25, 2010 7:13 am

Re: .hasFocus() Used for Tool Items and Section's Titles

Postby goksel » Sun Mar 27, 2011 11:43 pm

All,

I'm still snaggin on that problem.

Is anybody else meeting that kind of problem? Are there any other ways that anyone could advise?

Please help!
Göksel
goksel
 
Posts: 17
Joined: Thu Nov 25, 2010 7:13 am

Re: .hasFocus() Used for Tool Items and Section's Titles

Postby goksel » Thu Mar 31, 2011 3:21 am

Still no answer from the support team...
I can see that other issues are replied.
Is there information missing? Is something unclear?
Please help!
Thanks, Göksel
goksel
 
Posts: 17
Joined: Thu Nov 25, 2010 7:13 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest

cron