title: Python Selenium - Code does not execute properly unless chrome instance is "viewable"
body: <p>I'm trying to run multiple drivers through multi-threading using Selenium. However I'm experiencing a weird problem, when I have more than 5 drivers open for example, the code seems to execute in the background in the sense that it navigates over to the webpages and clicks elements etc. But the program does not go through any print statements nor does it close at the end until I click on the chrome window and it is &quot;viewable&quot; on the screen. I also noticed if I have any other application (say Sublime Text) over the chrome instance than it's the same problem.</p>
  <p>I was able to work this before even when I have 50 different instances running at the same time but not sure what happened that it's doing this. Any help would be appreciated and if I can provide any other details.</p>
  <p>The following is what I am using in the options to create my driver:</p>
  <pre><code>PATH = self.webDriverPath
  options = webdriver.ChromeOptions()
  options.add_experimental_option(&quot;excludeSwitches&quot;, [&quot;enable-logging&quot;])
  options.add_experimental_option(&quot;detach&quot;, True)
  options.add_argument(&quot;--start-maximized&quot;)
  self.driver = webdriver.Chrome(executable_path = PATH, options = options)
  </code></pre>
  <p>I'm also getting the following message:</p>
  <p>DevTools listening on ws://127.0.0.1:62963/devtools/browser/11b5a873-fe5a-4831-878f-a9c0225c062d
  [504:2752:1119/191918.546:ERROR:device_event_log_impl.cc(211)] [19:19:18.546] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)</p>
  <p>NOTE:</p>
  <p>I hovered my mouse over the chrome icon that pops up and I can see the Title changing when going to a webpage for example. But the preview stays blank. Before I was able to see the preview of what the page looks like without actually opening up the window.</p>