Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Knowing whether Eclipse has focus

Here is the method used by SWTBot to find the activeShell: http://git.eclipse.org/c/swtbot/org.eclipse.swtbot.git/tree/org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/finders/ControlFinder.java#n284
It is assumed and observed to return null when the application under test doesn't have focus (ex https://wiki.eclipse.org/SWTBot/Troubleshooting#WidgetNotFoundException_when_stepping_through_SWTBot_test_in_Eclipse_debugger ).

HTH

--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

Back to the top