@Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF()); log.println("creating a textdocument"); xTextDoc = SOF.createTextDoc(null); log.println("maximize the window size"); XModel xModel = UnoRuntime.queryInterface(XModel.class, xTextDoc); XFrame xFrame = xModel.getCurrentController().getFrame(); XWindow xWin = xFrame.getContainerWindow(); Toolkit.getDefaultToolkit(); Dimension dim = new Dimension(800, 600); Rectangle newPosSize = xWin.getPosSize(); newPosSize.Width = new Double(dim.getWidth()).intValue(); newPosSize.Height = new Double(dim.getHeight()).intValue(); newPosSize.X = 0; newPosSize.Y = 0; xWin.setPosSize( newPosSize.X, newPosSize.Y, newPosSize.Width, newPosSize.Height, com.sun.star.awt.PosSize.POSSIZE); }