< prev index next >

application/uitests/org.openjdk.jmc.test.jemmy/src/test/java/org/openjdk/jmc/test/jemmy/misc/wrappers/MCChartCanvas.java

Print this page

        

*** 98,107 **** --- 98,108 ---- * @param menuItemText * the menu item of interest */ @SuppressWarnings("unchecked") public void clickContextMenuItem(String menuItemText) { + focusMc(); StringPopupOwner<Shell> contextMenu = control.as(StringPopupOwner.class); contextMenu.setPolicy(StringComparePolicy.SUBSTRING); contextMenu.push(getRelativeClickPoint(), new String[]{menuItemText}); }
*** 123,133 **** */ private Point getRelativeClickPoint() { Fetcher<Point> fetcher = new Fetcher<Point>() { @Override public void run() { ! setOutput(new Point(control.getScreenBounds().x, control.getScreenBounds().y)); } }; Display.getDefault().syncExec(fetcher); return fetcher.getOutput(); } --- 124,134 ---- */ private Point getRelativeClickPoint() { Fetcher<Point> fetcher = new Fetcher<Point>() { @Override public void run() { ! setOutput(new Point(control.getScreenBounds().x / 2, control.getScreenBounds().y / 2)); } }; Display.getDefault().syncExec(fetcher); return fetcher.getOutput(); }
< prev index next >