fixed multiple buttons bug for tabs_till_verify (#1677)

This commit is contained in:
Prodan Denis
2026-08-25 05:30:39 +01:00
committed by GitHub
parent 716451bc30
commit bc4d136fa7
+9 -3
View File
@@ -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();
""")