Невозможно остановить расширение Chrome для повторной попытки подключения, используемого в сценарии Selenium - PullRequest
0 голосов
/ 04 июля 2019

Я автоматизирую сценарий, при котором после нажатия на ссылку он перенаправляет меня на другую страницу, которая запускает страницу браузера с всплывающим окном аутентификации из-за входа в систему AD FS. Я пытался обработать его с помощью расширения Chrome, и он успешно обрабатывается, но в промежутке между выполнением сценария повторяется попытка подключения несколько раз следующим образом:

[04/07/2019 11:48:48 AM] WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x09955250>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',)': /session/7bd001bbfaf61875a5579c84a0cce104/window
[04/07/2019 11:48:49 AM] WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x09BA9A70>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',)': /session/7bd001bbfaf61875a5579c84a0cce104/window
[04/07/2019 11:48:50 AM] WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00D804D0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',)': /session/7bd001bbfaf61875a5579c84a0cce104/window
[04/07/2019 11:48:51 AM] ERROR: Execution error: HTTPConnectionPool(host='127.0.0.1', port=55740): Max retries exceeded with url: /session/7bd001bbfaf61875a5579c84a0cce104/window (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00D80450>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))
[04/07/2019 11:48:52 AM] WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00D80530>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',)': /session/7bd001bbfaf61875a5579c84a0cce104/window
[04/07/2019 11:48:53 AM] WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00D80590>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',)': /session/7bd001bbfaf61875a5579c84a0cce104/window
[04/07/2019 11:48:54 AM] WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00D805D0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',)': /session/7bd001bbfaf61875a5579c84a0cce104/window

Файл JavaScript для расширения, которое я использую:

chrome.webRequest.onAuthRequired.addListener(
  function handler(details) {    
    return {cancel:true};
  },
  {urls: ["<all_urls>"]},
  ['blocking']
);
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...