Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / sc / qa / uitest / calc_tests7 / tdf124818.py
blob1345484268b76e59d53adbf06a6b64c5c87aac2e
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 from uitest.framework import UITestCase
8 from uitest.uihelper.common import get_state_as_dict
9 from uitest.uihelper.common import select_pos
10 from uitest.uihelper.calc import enter_text_to_cell
11 from libreoffice.calc.document import get_cell_by_position
12 from libreoffice.uno.propertyvalue import mkPropertyValues
13 from uitest.uihelper.common import get_state_as_dict, type_text
14 from uitest.debug import sleep
15 import org.libreoffice.unotest
16 import pathlib
18 def get_url_for_data_file(file_name):
19 return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
21 #Bug 124818 - CRASH: selecting all and switching spreadsheet
23 class tdf124818(UITestCase):
24 def test_tdf124818_crash_select_all_and_switch_spreadsheet(self):
25 calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf124818.xls"))
26 xCalcDoc = self.xUITest.getTopFocusWindow()
27 gridwin = xCalcDoc.getChild("grid_window")
28 document = self.ui_test.get_component()
30 #Select all ( Ctrl + A );Go to sheet Graph2;Select all;Crash
31 self.xUITest.executeCommand(".uno:SelectAll")
32 self.xUITest.executeCommand(".uno:JumpToPrevTable")
33 self.xUITest.executeCommand(".uno:SelectAll")
35 #verify; no crashes
36 self.assertEqual(document.Sheets.getCount(), 3)
38 self.ui_test.close_doc()
39 # vim: set shiftwidth=4 softtabstop=4 expandtab: