From: spo Date: Fri, 16 Oct 2015 08:46:35 +0000 (+0300) Subject: Move findMenuItem() in tools X-Git-Tag: V_2.0.0_alfa1~83 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c2b44fdbebfa25412819d919b48e3f4b7a6878c8;p=modules%2Fshaper.git Move findMenuItem() in tools --- 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"))