Kaydet (Commit) 5f5575f8 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

uitest: add demo for handling two files

Change-Id: I03cbe67922df521a6cef5f3448c0c9dce10b662d
üst f260194a
# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
# 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 libreoffice.uno.propertyvalue import mkPropertyValues
from libreoffice.uno.eventlistener import EventListener
from uitest.framework import UITestCase
from uitest.debug import sleep
import time
class HandleFiles(UITestCase):
def test_load_file(self):
calc_file = self.ui_test.load_file("file:///home/moggi/devel/libo9/uitest/data/test.ods")
calc_file2 = self.ui_test.load_file("file:///home/moggi/devel/libo9/uitest/data/test2.ods")
frames = self.ui_test.get_frames()
self.assertEqual(len(frames), 2)
frames = self.ui_test.get_frames()
self.assertEqual(len(frames), 1)
# this is currently still necessary as otherwise
# the command is not forwarded to the correct frame
# TODO: provide an additional event that we can use
# and get rid of the sleep
# vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment