summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornags <nags@nags-desktop.(none)>2009-07-27 20:56:46 -0700
committernags <nags@nags-desktop.(none)>2009-07-27 20:56:46 -0700
commit8569ff46a6b82aed3702877ccf714338f46526b9 (patch)
tree8aa39acd530d51c8dcb5afeb09e31f54b09f46f5
parentd1591966860e470bd680656b2975833f44a5864b (diff)
2009-07-27 Nagappan Alagappan <nagappan@gmail.com>
* ldtp.py (onwindowcreate): Fixed bug 586291 – Subsequent tests fail when first one registers callback handlers
-rw-r--r--python/ChangeLog5
-rw-r--r--python/ldtp.py7
2 files changed, 9 insertions, 3 deletions
diff --git a/python/ChangeLog b/python/ChangeLog
index d047495..debdb8c 100644
--- a/python/ChangeLog
+++ b/python/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-27 Nagappan Alagappan <nagappan@gmail.com>
+
+ * ldtp.py (onwindowcreate): Fixed bug 586291 – Subsequent tests
+ fail when first one registers callback handlers
+
2009-07-24 Nagappan Alagappan <nagappan@gmail.com>
* ldtputils.py (imagecapture.capturescreenshot): Fixed bug 589898
diff --git a/python/ldtp.py b/python/ldtp.py
index d892f09..0e071ca 100644
--- a/python/ldtp.py
+++ b/python/ldtp.py
@@ -1978,7 +1978,10 @@ def releasecontext (oldContext = "", newContext = ""):
def onwindowcreate (windowTitle, callbackFuncName):
""" On new window creation event, notify
- INPUT: onwindowcreate ('<window title to watch>', <callback function to be called on window create event>)
+ If registered with same title more than once, only the last title will
+ be used, previously registered will be ignored
+ INPUT: onwindowcreate ('<window title to watch>',
+ <callback function to be called on window create event>)
OUTPUT: 1 on success, LdtpExecutionError on failure"""
@@ -1990,8 +1993,6 @@ def onwindowcreate (windowTitle, callbackFuncName):
print windowTitle
# Check for previous instance of the window title
if _callbackFunctions.has_key (windowTitle):
- # Exit last thread registered with same window title
- _callbackFunctions [windowTitle][1].exit ()
# delete the previous instance
del _callbackFunctions [windowTitle]
_callbackFunctions [windowTitle] = [callbackFuncName, threadId]