diff --git a/hh_browser.py b/hh_browser.py index bc35494..f716398 100644 --- a/hh_browser.py +++ b/hh_browser.py @@ -280,6 +280,8 @@ def open_response_page(account_dir, user, account, vacancy, message, # Ждём подтверждение и снимаем скриншот результата page.wait_for_timeout(2500) shot = _save_screenshot(page, screenshot_dir, vacancy["id"]) + # Отклик отправлен — закрываем браузер автоматически + _close_context(key) return True, "Отклик отправлен", shot shot = _save_screenshot(page, screenshot_dir, vacancy["id"]) @@ -298,6 +300,8 @@ def confirm_send(user, account, vid): if btn.is_visible(timeout=3000): btn.click() page.wait_for_timeout(1500) + # Отклик отправлен — закрываем браузер автоматически + _close_context(key) return True, "Кнопка «Отправить» нажата. Проверьте статус отклика на hh.ru." except Exception: continue