From c2b44fdbebfa25412819d919b48e3f4b7a6878c8 Mon Sep 17 00:00:00 2001 From: spo Date: Fri, 16 Oct 2015 11:46:35 +0300 Subject: [PATCH] Move findMenuItem() in tools --- test.squish/shared/scripts/common.py | 9 +++++++++ .../tst_ACTIVE_DOC_MANAGEMENT/test.py | 6 ------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/test.squish/shared/scripts/common.py b/test.squish/shared/scripts/common.py index 757e1ec1f..23e9efa5d 100644 --- a/test.squish/shared/scripts/common.py +++ b/test.squish/shared/scripts/common.py @@ -9,6 +9,15 @@ g_points = {"XY_plane": (332, 250), "XZ_plane": (355, 207)} # one of the constru def help_points(name): return g_points[name] +#--------------------------------------------------------------------------------------------- +# Tools +def findMenuItem(menuObject, item): + for child in object.children(menuObject): + if child.text == item: + return child + return None + +#--------------------------------------------------------------------------------------------- def set_defaults(): waitForObject(":SALOME*_STD_TabDesktop").resize(1024, 768) diff --git a/test.squish/suite_OBJECT_BROWSER/tst_ACTIVE_DOC_MANAGEMENT/test.py b/test.squish/suite_OBJECT_BROWSER/tst_ACTIVE_DOC_MANAGEMENT/test.py index f8cf838f8..2382e05d7 100644 --- a/test.squish/suite_OBJECT_BROWSER/tst_ACTIVE_DOC_MANAGEMENT/test.py +++ b/test.squish/suite_OBJECT_BROWSER/tst_ACTIVE_DOC_MANAGEMENT/test.py @@ -52,12 +52,6 @@ def checkPartDeactivatedState(scenario): for element in allPartSetElements: test.compare(ENABLE_COLOR, waitForObjectItem(":Object browser_XGUI_DataTree", element).foregroundColor, "%s is enabled after: %s" % (element, scenario)) -def findMenuItem(menuObject, item): - for child in object.children(menuObject): - if child.text == item: - return child - return None - def main(): source(findFile("scripts", "common.py")) -- 2.39.2