java - SWTBot eclipse - How to terminate (stop project) a running project -


i'm trying stop running project using swtbot plug-in (for automation testing). i've tried terminate project following command:

bot.toolbarbuttonwithtooltip("terminate").click(); 

but doesn't work! also, thought problem element focus issue, fixed with:

// go console window (focus) keyboardfactory.getawtkeyboard().pressshortcut(keystrokes.alt,keystrokes.shift,keystroke.getinstance(0, 'q')); bot.sleep(100); keyboardfactory.getawtkeyboard().pressshortcut(keystroke.getinstance(0, 'c')); bot.sleep(3000); // todo: try terminate project bot.toolbarbuttonwithtooltip("terminate").click(); 

but still doesn't work!!

i tried use bot.button() instead of toolbarbuttonwithtooltip(), , doesn't work...

thanks

try pass index instead of string acces toolbar button, or terminate run menu:

bot.menu("run").menu("terminate").click(); 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -