Difference between revisions of "SWTBot/Snippets"

From Eclipsepedia

Jump to: navigation, search
m
m (using templates for creating links)
Line 1: Line 1:
 +
{{SWTBot}}
 
Some snippets for working with SWTBot
 
Some snippets for working with SWTBot
  
Line 16: Line 17:
 
bot.button("OK").click();
 
bot.button("OK").click();
 
</source>
 
</source>
 
[[Category: SWTBot]]
 

Revision as of 03:35, 1 July 2009


SWTBot
Website
Update Sites
Community
Mailing List
Forums/Newsgroups
IRC
Contribute
Open Bugzilla tickets
Open Gerrit reviews
Browse Source
Continuous Integration


Some snippets for working with SWTBot


Switch perspective

This allows you to switch perspectives in eclipse from within the Window>Open Perspective>Other... menu.

// Change the perspective via the Open Perspective dialog       
bot.menu("Window").menu("Open Perspective").menu("Other...").click();
SWTBotShell openPerspectiveShell = bot.shell("Open Perspective");
openPerspectiveShell.activate();
 
// select the dialog
bot.table().select("Debug");
bot.button("OK").click();