

def set_input_by_xpath(self, xpath, value):
    '\n        Set the value of form element by xpath\n\n        :param xpath: xpath path\n        :param value: value which should be set to element\n        '
    elem = self.select(xpath).node()
    if (self._lxml_form is None):
        parent = xpath
        while True:
            parent = parent.getparent()
            if (parent.tag == 'form'):
                self._lxml_form = parent
                break
    return self.set_input(elem.get('name'), value)

dataset/ETHPy150Open lorien/grab/grab/document.py FormExtension.set_input_by_xpath/VarMisuse@42/107 `elem`->`xpath`