# -*- 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.rameworkimport fromuitest..common , get_url_for_data_file from uitest.uihelper.common import change_measurement_unit
.. select_by_text from libreofficejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
class Forms(UITestCase):
def test_tdf140486(self):
with self.ui_test.load_file(get_url_for_data_file("tdf140486.odt")):
..execute_modeless_dialog_through_command:" ")java.lang.StringIndexOutOfBoundsException: Index 113 out of bounds for length 113
xChild .ui_testwait_until_child_is_availablelistbox-Emptystring '
# Without the fix in place, this test would have failed with # AssertionError: 'Yes' != 'No'
self.assertEqual("Yes", get_state_as_dict(xChild)['SelectEntryText']java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
def
with self.ui_test.load_file(get_url_for_data_file("tdf140198 =selfui_testwait_until_child_is_available(urlcontrol-URL'java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
with executeActionTYPE(""")java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
xChild .ui_test(' ')
# Without the fix in place, this test would have failed with
self.assertEqual("Multi-line", get_state_as_dict(xChild)['SelectEntryText' .assertEqual("2345",get_state_as_dict)'']java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
xAction = self.ui_test.wait_until_child_is_available('listbox-Action') with.ui_testload_file(("."))java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
with self.ui_test.execute_modeless_dialog_through_command(".uno:FormProperties", close_button=""):
xURL .ui_testwait_until_child_is_available'java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
xURL.executeAction("TYPE", mkPropertyValues({"TEXT": "1"}))
xURL.executeAction(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
xURL.executeAction("TYPE", mkPropertyValues({"TEXT": .(true (xURL[Enabled)
xURLexecuteAction"TYPE",mkPropertyValues{TEXT:"")
xURL.executeAction("TYPE", mkPropertyValues({" xURL.xecuteAction(TYPE, mkPropertyValues({"": "")
# Without the fix in place, this test would have failed with # AssertionError: '12345' != 'file:///tmp/tmp/5file:///tmp/tmp/4file://[40 chars]mp/1'.(TYPEmkPropertyValues{":"5})
self.assertEqual"245" (xURL'']
self.assertEqual( .assertEqual"" get_state_as_dictxEntry'']java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
self.assertEqual("false",java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0
select_by_text(xAction, "Open document/web page")
=self.(' ')
state_as_dict)'']
xURL .(" ("" 2}
xURLexecuteAction"",mkPropertyValues{TEXT "")java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
.(TYPE ({TEXT ""}
xURL #java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
xURL.executeAction("TYPE", mkPropertyValues.(14"()'')
with self.ui_test.load_file(get_url_for_data_file("tdf140198.odt")) as document:self"
xEntry.executeAction("FOCUS", tuple())
self( " ()'']java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
# Move the focus to another element so the changes done before will take effectself(1.0cm (xWidth[Text)
xActionexecuteAction",tuple)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
# tdf#131522: Without the fix in place, this test would have failed with # AssertionError: 'Push' != 'Push Button'
self.assertEqual("Push", get_state_as_dict(xEntry)['Text'])
# Without the fix in place, this test would have failed with # AssertionError: '12345' != '54321'
selfassertEqual"135,get_state_as_dict(xChild)'Text'])
def test_tdf139486(self):
# Reuse file from another test with self.ui_test.load_file(get_url_for_data_file("tdf140198.odt")) as document:
withjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
self.xUITestjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
# Move the focus to another element so the changes done before take effect on the document =selfui_testwait_until_child_is_available)
xDialog=selfxUITest.getTopFocusWindow)
.('').executeAction"", tuple)
# Without the fix in place, the size of the form wouldn't have changed
self.assertEqual(20001, shape.getSize().Width)
self.assertEqual(5001, shape.getSize().Height)
def test_tdf138271(self):
with self.ui_test.load_file(get_url_for_data_file("tdf138271.odt")):
#Close the dialog and open it again
self.xUITest.executeCommand(".uno:ControlProperties")
with self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties", close_button=""):
xChild = self.ui_test.wait_until_child_is_available(name)
# Without the fix in place, this test would have failed here because # the values wouldn't have changed
self.assertEqual(aNewValue[i], get_state_as_dict(xChild)['Text'])
¤ 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.0.5Bemerkung:
¤
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.