17 from robot.libraries.BuiltIn
import BuiltIn
31 ContextAware.__init__(self, ctx)
35 def find(self, criteria, tag, constraints, parent):
37 if isinstance(self.
finderfinder, basestring):
38 element = BuiltIn().run_keyword(self.
finderfinder, parent,
39 criteria, tag, constraints)
40 elif hasattr(self.
finderfinder,
'__call__'):
41 element = self.
finderfinder(parent, criteria, tag, constraints)
43 raise AttributeError(
'Invalid type provided for Custom Locator %s'
47 if hasattr(element,
'__len__')
and not isinstance(element, basestring):
def __init__(self, ctx, name, finder)
def find(self, criteria, tag, constraints, parent)