User ( posted:

Our keyword-driven PowerBuilder-application tests encounter some
objects of class edit that are systematically related to tables of
class object. In this case, the edit object's default logical name
is predictable from the table's name and the table's name is
predictable from the edit object's name. But some edit object do
_not_ have corresponding tables, and there is no straightforward way
to tell the two types of edit objects apart.

When an edit object _does_ have a corresponding table, WinRunner often
refuses to recognize the edit object itself, so when a test script
specifies an edit object our driver/engine frequently must enter data
into the corresponding table. We have TSL functions that, given the
logical name of the edit object, will reliably determine the logical
name of the corresponding table (if there is such a table), so this
is quite workable, once we know that a given edit object in a given
window is inaccessible.

There's the rub: we cannot determine whether such-and-such an edit
object in such-and-such a window is accessible--we cannot determine
whether WinRunner can find the object or, despite the fact that it
_does_ exist, will claim that it _doesn't_ exist and will error out,
with the Run Wizard appearing. If we cannot tell whether a
particular edit object in a particular window is accessible, the
driver/engine cannot know when to look for the corresponding table
and enter data into it. We have not yet found a reliable method to
determine whether a given object in a given window is accessible--not
without encountering the Run Wizard or switching to batch mode,
neither of which is appropriate in our environment.

obj_exists() does not report whether such-and-such an object in such-
and-such a window is accessible, but whether such-and-such an object
is displayed on-screen, so it does not accomplish what we need. As a
practical matter, it does not even come close. We need an
obj_exists_in_win() TSL function. How can we code such a function?
Thanks for your ideas!

Greg Enos
Mindport, Inc.