Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
8fbe0a6f
Kaydet (Commit)
8fbe0a6f
authored
9 years ago
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
uitest: add treelist demo
Change-Id: I41796a2a557143030cbd016399c2c1bf5cde37bd
üst
71f562f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
+65
-0
demo_ui.txt
uitest/demo_ui/demo_ui.txt
+1
-0
treelist.py
uitest/demo_ui/treelist.py
+64
-0
No files found.
uitest/demo_ui/demo_ui.txt
Dosyayı görüntüle @
8fbe0a6f
...
...
@@ -9,6 +9,7 @@ demo_ui.listbox.select_entry_text
demo_ui.tabcontrol.select_pos
demo_ui.tabdialog.select_tab_page_pos
demo_ui.tabdialog.select_tab_page_name
demo_ui.treelist.expand
demo_ui.spinfield.up
demo_ui.spinfield.down
demo_ui.spinfield.text
This diff is collapsed.
Click to expand it.
uitest/demo_ui/treelist.py
0 → 100644
Dosyayı görüntüle @
8fbe0a6f
# -*- 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/.
#
import
time
from
uitest_helper
import
UITest
from
helper
import
mkPropertyValues
from
uihelper.calc
import
enter_text_to_cell
from
uitest_helper
import
get_state_as_dict
try
:
import
pyuno
import
uno
import
unohelper
except
ImportError
:
print
(
"pyuno not found: try to set PYTHONPATH and URE_BOOTSTRAP variables"
)
print
(
"PYTHONPATH=/installation/opt/program"
)
print
(
"URE_BOOTSTRAP=file:///installation/opt/program/fundamentalrc"
)
raise
def
expand
(
xContext
):
xUITest
=
xContext
.
ServiceManager
.
createInstanceWithContext
(
"org.libreoffice.uitest.UITest"
,
xContext
)
ui_test
=
UITest
(
xUITest
,
xContext
)
ui_test
.
create_doc_in_start_center
(
"calc"
)
xCalcDoc
=
xUITest
.
getTopFocusWindow
()
xGridWindow
=
xCalcDoc
.
getChild
(
"grid_window"
)
enter_text_to_cell
(
xGridWindow
,
"B2"
,
"=2+3+4"
)
xGridWindow
.
executeAction
(
"SELECT"
,
mkPropertyValues
({
"CELL"
:
"B2"
}))
ui_test
.
execute_modeless_dialog_through_command
(
".uno:FunctionDialog"
)
xFunctionDlg
=
xUITest
.
getTopFocusWindow
()
xTabs
=
xFunctionDlg
.
getChild
(
"tabs"
)
xTabs
.
executeAction
(
"SELECT"
,
mkPropertyValues
({
"POS"
:
"1"
}))
xTreelist
=
xTabs
.
getChild
(
"struct"
)
xTreeEntry
=
xTreelist
.
getChild
(
'0'
)
xTreeEntry
.
executeAction
(
"COLLAPSE"
,
tuple
())
time
.
sleep
(
1
)
xTreeEntry
.
executeAction
(
"EXPAND"
,
tuple
())
time
.
sleep
(
1
)
xCancelBtn
=
xFunctionDlg
.
getChild
(
"cancel"
)
xCancelBtn
.
executeAction
(
"CLICK"
,
tuple
())
ui_test
.
close_doc
()
# vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment