Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from libreoffice.uno.propertyvalue import mkPropertyValues
- from uitest.framework import UITestCase
- from uitest.path import get_srcdir_url
- import time
- import unittest
- def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/uitest/calc_tests/data/" + file_name
- class CalcChartCopyPaste(UITestCase):
- def test_copy_paste_crash(self):
- doc = self.ui_test.load_file(get_url_for_data_file("tdf108881.ods"))
- #xGridWindow = self.xUITest.getTopFocusWindow().getChild("grid_window")
- #xGridWindow.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
- #xGridWindow.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+X"}))
- self.ui_test.close_doc()
- self.ui_test.create_doc_in_start_center("calc")
- #xGridWindow = self.xUITest.getTopFocusWindow().getChild("grid_window")
- #xGridWindow.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+V"}))
- self.ui_test.close_doc()
- #######[Backtrace]##########################################################################
- ======================================================================
- ERROR: test_copy_paste_crash (chart_copy_paste.CalcChartCopyPaste)
- ----------------------------------------------------------------------
- Traceback (most recent call last):
- File "/ssd1/work/dennis/core/uitest/uitest/test.py", line 128, in create_doc_in_start_center
- xBtn = xStartCenter.getChild(app + "_all")
- uno.com.sun.star.uno.RuntimeException: Could not find child with id: calc_all
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "/ssd1/work/dennis/core/uitest/calc_tests/chart_copy_paste.py", line 27, in test_copy_paste_crash
- self.ui_test.create_doc_in_start_center("calc")
- File "/ssd1/work/dennis/core/uitest/uitest/test.py", line 131, in create_doc_in_start_center
- self._handle_crash_reporter()
- File "/ssd1/work/dennis/core/uitest/uitest/test.py", line 123, in _handle_crash_reporter
- raise RuntimeException("not a crashreporter")
- File "/ssd1/work/dennis/core/instdir/program/uno.py", line 488, in _uno_struct__init__
- struct, used = pyuno._createUnoStructHelper(self.__class__.__pyunostruct__, args, **kwargs)
- uno.com.sun.star.uno.RuntimeException: pyuno._createUnoStructHelper: member 'Context' of struct type 'com.sun.star.uno.Exception' not given a value.
Add Comment
Please, Sign In to add comment