diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-01-12 12:29:07 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-01-12 21:24:20 +0100 |
commit | 82cb5a3bb27bb70c97b3d04b9de97a3ff67231c5 (patch) | |
tree | 85647dabe3184e6a416bdcc777a0f698a8fcb51f /uitest | |
parent | 695afb787681c9f288856a1a00fe6041614172d2 (diff) |
uitest: sc: factor out common code ( part 1 )
Change-Id: Ib0b84349c138d361001af4547d91a81d8b5d8e63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109166
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/uitest/uihelper/common.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/uitest/uitest/uihelper/common.py b/uitest/uitest/uihelper/common.py index 7af57ea2fa92..cb9a761cb7f9 100644 --- a/uitest/uitest/uihelper/common.py +++ b/uitest/uitest/uihelper/common.py @@ -6,6 +6,8 @@ # from libreoffice.uno.propertyvalue import convert_property_values_to_dict, mkPropertyValues +import org.libreoffice.unotest +import pathlib def get_state_as_dict(ui_object): return convert_property_values_to_dict(ui_object.getState()) @@ -19,6 +21,9 @@ def select_pos(ui_object, pos): def select_text(ui_object, from_pos, to): ui_object.executeAction("SELECT", mkPropertyValues({"FROM": from_pos, "TO": to})) +def get_url_for_data_file(file_name): + return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + def change_measurement_unit(UITestCase, unit): UITestCase.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") xDialogOpt = UITestCase.xUITest.getTopFocusWindow() |