Open largomath2010 opened 5 years ago
You should get the button in javascript itself, so something like execute_script("document.querySelector(arguments[0]).scrollIntoView(false)", button_css)
should work.
So, I loop through a list of element from get_elements() and do some same process for all of them.
That's why i can not pass the button_css.
Is there anyway i can extract the css/xpath selector of current selected element and pass it to execute_scripts ?
Hi,
I'm trying to use execute script and passing element to the script. The document is not so clear about this except: Arguments to pass to the script. Must be JSON serializable.
So I try:
But it turn out Object of type 'CompatElement' is not JSON serializable.
What is correct way to do this?