In my SWTBot test, I'm trying to open (and click) the menu that appears when right clicking on the open project in project explorer (the menu that contains New, Refactor, Import etc.)
I tried to use
`treeItem.contextMenu("Refactor").menu("Rename...").click();
and got WidgetNotFoundException
.
help please.
This is currently a known bug in SWTBot...
You cannot access sub-menus of the context menu. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=261360
2 alternatives:
Hope this helps.
you can use a now native function:
new SWTBotMenu(ContextMenuHelper.contextMenu(bot.tree(), "Refactor", "Rename...")).click();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.