mirror of
https://github.com/FlareSolverr/FlareSolverr.git
synced 2026-09-24 13:40:12 +01:00
fixed multiple buttons bug for tabs_till_verify (#1677)
This commit is contained in:
@@ -304,10 +304,16 @@ def _get_turnstile_token(driver: WebDriver, tabs: int):
|
||||
|
||||
# reset focus
|
||||
driver.execute_script("""
|
||||
let old = document.getElementById('__focus_helper');
|
||||
if (old) old.remove();
|
||||
|
||||
let el = document.createElement('button');
|
||||
el.style.position='fixed';
|
||||
el.style.top='0';
|
||||
el.style.left='0';
|
||||
el.id = '__focus_helper';
|
||||
el.style.position = 'fixed';
|
||||
el.style.top = '0';
|
||||
el.style.left = '0';
|
||||
el.style.opacity = '0.01';
|
||||
el.style.pointerEvents = 'none';
|
||||
document.body.prepend(el);
|
||||
el.focus();
|
||||
""")
|
||||
|
||||
Reference in New Issue
Block a user