mirror of
https://github.com/FlareSolverr/FlareSolverr.git
synced 2026-10-02 09:15:54 +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
|
# reset focus
|
||||||
driver.execute_script("""
|
driver.execute_script("""
|
||||||
|
let old = document.getElementById('__focus_helper');
|
||||||
|
if (old) old.remove();
|
||||||
|
|
||||||
let el = document.createElement('button');
|
let el = document.createElement('button');
|
||||||
el.style.position='fixed';
|
el.id = '__focus_helper';
|
||||||
el.style.top='0';
|
el.style.position = 'fixed';
|
||||||
el.style.left='0';
|
el.style.top = '0';
|
||||||
|
el.style.left = '0';
|
||||||
|
el.style.opacity = '0.01';
|
||||||
|
el.style.pointerEvents = 'none';
|
||||||
document.body.prepend(el);
|
document.body.prepend(el);
|
||||||
el.focus();
|
el.focus();
|
||||||
""")
|
""")
|
||||||
|
|||||||
Reference in New Issue
Block a user