Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Using EclipseSpy View location to find widgets
Using EclipseSpy View location to find widgets [message #778179] Wed, 11 January 2012 14:31 Go to next message
Olivier Parisy is currently offline Olivier Parisy
Messages: 15
Registered: June 2011
Junior Member
Hi,

an evolution suggestion: could the "Location" information provided by EclipseSpy View be used to find a widget?

Something along the line of :
bot.widgetByLocation("//Shell/-1//Shell/-1//Composite/0//Composite/0//Composite/0//Composite/1//Composite/1//Composite/0//Text/1")

Or, to avoid changing the API, perhaps this could be implemented through a Matcher?

This would make it easy to access to widgets in plugins that do not change often (standard Eclipse wizards as an example).

Did any of you already use the location information programmatically?

Regards.
Re: Using EclipseSpy View location to find widgets [message #780013 is a reply to message #778179] Tue, 17 January 2012 02:03 Go to previous message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
One of the key driving principles behind SWTBot's is to build API that improves readability of tests. As such the matcher here does not fall into that category.

Also I should mention that if the layout of the UI changes the tests *will* start failing and debugging will not really throw any light because you'd really not know what widget the matcher was actually matching before the test starts failing without a lot of comments in code.

- Ketan
Previous Topic:Toolbar with Dropdown Items via ExtensionPoint
Next Topic:method to select a menuItem object for opening Properties window of a project
Goto Forum:
  


Current Time: Fri Oct 31 07:15:31 GMT 2014

Powered by FUDForum. Page generated in 0.08988 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software