def ie(self, element: WebElement, is_sent_keys: bool, value=None): if is_sent_keys and value is not None: logger.info(f'typing on {element} with {value}') element.send_keys(value) elif is_sent_keys is False: logger.info(f'clicking on {element}') element.click() else: raise ValueError('invalid values for function')
def send_keys(el: WebElement, data: str): el.click() el.send_keys(data)
def clear(el: WebElement): el.click() el.clear()