我试图通过将JPopupMenu(testJPopupMenu)传递给它来创建一个新的JPopupMenuFixture,如下所示:
JPopupMenuFixture jpopupMenuFixture =新的JPopupMenuFixture(新的RobotFixture,testJPopupMenu);

虽然我不确定如何实例化RobotFixture的新实例以传递给构造函数...

最佳答案

如何实例化RobotFixture的新实例以传递给构造函数?


RobotFixture.robotWithCurrentAwtHierarchy()

要么

RobotFixture.robotWithNewAwtHierarchy()

有关更多信息,请参见source code of RobotFixture

10-08 09:22