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
144edb88
Kaydet (Commit)
144edb88
authored
Haz 13, 2017
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
uitest: extract the wait time for the dialogs
Change-Id: Ieb82b643de58523cef30f88363276874b6169021
üst
bbfe78c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
config.py
uitest/uitest/config.py
+2
-0
test.py
uitest/uitest/test.py
+9
-8
No files found.
uitest/uitest/config.py
Dosyayı görüntüle @
144edb88
...
...
@@ -9,4 +9,6 @@ use_sleep = False
DEFAULT_SLEEP
=
0.1
MAX_WAIT
=
30
# vim: set shiftwidth=4 softtabstop=4 expandtab:
uitest/uitest/test.py
Dosyayı görüntüle @
144edb88
...
...
@@ -8,6 +8,7 @@
import
time
import
threading
from
uitest.config
import
DEFAULT_SLEEP
from
uitest.config
import
MAX_WAIT
from
uitest.uihelper.common
import
get_state_as_dict
from
com.sun.star.uno
import
RuntimeException
...
...
@@ -57,7 +58,7 @@ class UITest(object):
with
EventListener
(
self
.
_xContext
,
"OnLoad"
)
as
event
:
component
=
desktop
.
loadComponentFromURL
(
url
,
"_default"
,
0
,
tuple
())
time_
=
0
while
time_
<
30
:
while
time_
<
MAX_WAIT
:
if
event
.
executed
:
frames
=
self
.
get_frames
()
if
len
(
frames
)
==
1
:
...
...
@@ -71,7 +72,7 @@ class UITest(object):
with
EventListener
(
self
.
_xContext
,
"DialogExecute"
)
as
event
:
self
.
_xUITest
.
executeDialog
(
command
)
time_
=
0
while
time_
<
30
:
while
time_
<
MAX_WAIT
:
if
event
.
executed
:
time
.
sleep
(
DEFAULT_SLEEP
)
return
...
...
@@ -84,7 +85,7 @@ class UITest(object):
with
EventListener
(
self
.
_xContext
,
"ModelessDialogVisible"
)
as
event
:
self
.
_xUITest
.
executeCommand
(
command
)
time_
=
0
while
time_
<
30
:
while
time_
<
MAX_WAIT
:
if
event
.
executed
:
time
.
sleep
(
DEFAULT_SLEEP
)
return
...
...
@@ -100,7 +101,7 @@ class UITest(object):
with
EventListener
(
self
.
_xContext
,
event_name
)
as
event
:
ui_object
.
executeAction
(
action
,
parameters
)
time_
=
0
while
time_
<
30
:
while
time_
<
MAX_WAIT
:
if
event
.
executed
:
time
.
sleep
(
DEFAULT_SLEEP
)
return
...
...
@@ -132,7 +133,7 @@ class UITest(object):
with
EventListener
(
self
.
_xContext
,
"OnNew"
)
as
event
:
xBtn
.
executeAction
(
"CLICK"
,
tuple
())
time_
=
0
while
time_
<
30
:
while
time_
<
MAX_WAIT
:
if
event
.
executed
:
frames
=
self
.
get_frames
()
self
.
get_desktop
()
.
setActiveFrame
(
frames
[
0
])
...
...
@@ -149,7 +150,7 @@ class UITest(object):
with
EventListener
(
self
.
_xContext
,
"DialogClosed"
)
as
event
:
button
.
executeAction
(
"CLICK"
,
tuple
())
time_
=
0
while
time_
<
30
:
while
time_
<
MAX_WAIT
:
if
event
.
executed
:
time
.
sleep
(
DEFAULT_SLEEP
)
return
...
...
@@ -161,7 +162,7 @@ class UITest(object):
with
EventListener
(
self
.
_xContext
,
[
"DialogExecute"
,
"OnViewClosed"
]
)
as
event
:
self
.
_xUITest
.
executeDialog
(
".uno:CloseDoc"
)
time_
=
0
while
time_
<
30
:
while
time_
<
MAX_WAIT
:
if
event
.
hasExecuted
(
"DialogExecute"
):
xCloseDlg
=
self
.
_xUITest
.
getTopFocusWindow
()
xNoBtn
=
xCloseDlg
.
getChild
(
"discard"
)
...
...
@@ -178,7 +179,7 @@ class UITest(object):
with
EventListener
(
self
.
_xContext
,
[
"DialogExecute"
,
"ModelessDialogExecute"
])
as
event
:
thread
.
start
()
time_
=
0
while
time_
<
30
:
while
time_
<
MAX_WAIT
:
if
event
.
executed
:
xDlg
=
self
.
_xUITest
.
getTopFocusWindow
()
xUIElement
=
xDlg
.
getChild
(
dialog_element
)
...
...
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