Guest User

calc-uitest

a guest
Jul 14th, 2017
38
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from libreoffice.uno.propertyvalue import mkPropertyValues
  2. from uitest.framework import UITestCase
  3. from uitest.path import get_srcdir_url
  4.  
  5. import time
  6. import unittest
  7.  
  8. def get_url_for_data_file(file_name):
  9.     return get_srcdir_url() + "/uitest/calc_tests/data/" + file_name
  10.  
  11. class CalcChartCopyPaste(UITestCase):
  12.  
  13.     def test_copy_paste_crash(self):
  14.         doc = self.ui_test.load_file(get_url_for_data_file("tdf108881.ods"))
  15.         #xGridWindow = self.xUITest.getTopFocusWindow().getChild("grid_window")
  16.         #xGridWindow.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
  17.         #xGridWindow.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+X"}))
  18.         self.ui_test.close_doc()
  19.         self.ui_test.create_doc_in_start_center("calc")
  20.         #xGridWindow = self.xUITest.getTopFocusWindow().getChild("grid_window")
  21.         #xGridWindow.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+V"}))
  22.         self.ui_test.close_doc()
  23.  
  24.  
  25.  
  26.  
  27. #######[Backtrace]##########################################################################
  28. ======================================================================
  29. ERROR: test_copy_paste_crash (chart_copy_paste.CalcChartCopyPaste)
  30. ----------------------------------------------------------------------
  31. Traceback (most recent call last):
  32.   File "/ssd1/work/dennis/core/uitest/uitest/test.py", line 128, in create_doc_in_start_center
  33.     xBtn = xStartCenter.getChild(app + "_all")
  34. uno.com.sun.star.uno.RuntimeException: Could not find child with id: calc_all
  35.  
  36. During handling of the above exception, another exception occurred:
  37.  
  38. Traceback (most recent call last):
  39.   File "/ssd1/work/dennis/core/uitest/calc_tests/chart_copy_paste.py", line 27, in test_copy_paste_crash
  40.     self.ui_test.create_doc_in_start_center("calc")
  41.   File "/ssd1/work/dennis/core/uitest/uitest/test.py", line 131, in create_doc_in_start_center
  42.     self._handle_crash_reporter()
  43.   File "/ssd1/work/dennis/core/uitest/uitest/test.py", line 123, in _handle_crash_reporter
  44.     raise RuntimeException("not a crashreporter")
  45.   File "/ssd1/work/dennis/core/instdir/program/uno.py", line 488, in _uno_struct__init__
  46.     struct, used = pyuno._createUnoStructHelper(self.__class__.__pyunostruct__, args, **kwargs)
  47. uno.com.sun.star.uno.RuntimeException: pyuno._createUnoStructHelper: member 'Context' of struct type 'com.sun.star.uno.Exception' not given a value.
RAW Paste Data