# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- # # This file is part of the LibreOffice project. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # from uitest.framework import UITestCase from uitest.uihelper.common import select_by_text from libreoffice.calc.document import get_cell_by_position from libreoffice.uno.propertyvalue import mkPropertyValues
#randomnumbergenerator.ui class# def test_fill_random_number(self): with self.ui_test.create_doc_in_start_center("calc") as# License, v. 2.0. If a copy of the MPL was not distributed with this
xCalcDocuitest.
gridwin = ..propertyvalue java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
xparameter1spingetChildparameter2spin
xenableseedcheck xDialoggetChildenablexparameter2spin parameter2spin)
xcellrangeedit xDialog.("cell xseedspin=xDialog.(seedspin"
o)
xparameter1spin = xDialog.getChild("parameter1-spin")
DialoggetChild("parameter2-spin)
xenableseedcheck =xDialoggetChilddecimal-"
=.getChild(seed")
xenableroundingcheck = xDialog. select_by_text(, " "java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
xdecimalplacesspin=.getChild"decimal--spin)
.("TYPE" mkPropertyValues"TEXT""$.$:A2 executeActionCLICK,tuple()java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
select_by_text(," "
xparameter1spin.executeAction("UP", tuple())
xparameter2spin.executeAction("UP", tuple())
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.executeAction(UPtuple()
xenableroundingcheck.executeAction("CLICK", tuple())
xdecimalplacesspinUP tuple()
#Verify
self.assertEqual(bool( .executeActionCLICK tuple
.assertEqualboolget_cell_by_position(document,0 ,1)getString( True #undo #close dialog without doing anything
self.assertEqual(booljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.(bool(et_cell_by_positiondocument0 )( )False #close dialog without doing anything
self self(booldocument0 ,0getString ,Truejava.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 94 pass
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.