Don't know how to clear the text area before type in
When I use selenium WebDriver I know how to clear the input area because it provides a clear() method.
Hope this project can support more selenium method.
And I also feel puzzled about how to use selenium with botasaurus at the same time whit @task(becaue I am trying to get some selenium WebDriver method to handle some element, like clear the input area).
I try to use JS script to clear but find the driver.run_js() only can pass an argument. because if it is selenium driver, I can pass two arguments to the driver.excute_script(). because every element id is different. If I use tdriver.run_js() to clear target element text area I need repeat type same code every time.
js_clear = """/**
- @param {string} id */ var target_id = arguments[0]; function clearInputValue(target_id) { var input = document.getElementById(target_id); input.value = ''; } """
if it is selenium driver, I can let my code like this: driver.excute_script(js_clear, target_id)
but driver.run_js() can't.
use el.run_js