title: Selenium ChromeDriver use custom profile folder - permission error
body: <p>so I'm trying to create a custom webdriver (as in (down)load the normal driver but use custom profile settings) to get it to open any tab with a popped-out DevTools window (set to &quot;Console&quot;).</p>
  <p>I figured I could do that by setting up such a preference file by just interacting with my own installed Chrome version and copying my preferences to another folder, then let the Selenium WebDriver load its preferences from that folder.</p>
  <p>But when I tried starting the WebDriver using this:</p>
  <pre><code>options.addArguments(&quot;--profile-directory=\&quot;Default\&quot;&quot;);
  options.addArguments(&quot;--user-data-dir=./temp-selenium&quot;);
  </code></pre>
  <p>... it always shows an error (in german, roughly translated to):</p>
  <p><code>Google Chrome can't read or write in the following directory: ./temp-selenium</code></p>
  <p>Removing the second line completely just starts a Chome window with a user profile selection prompt. Setting up a file path to something like AppData doesn't work because then I get the following error:</p>
  <p><code>Could not remove old devtools port file. Perhaps the given user-data-dir at &quot;myFilePath\User Data&quot; is still attached to a running Chrome ...</code></p>
  <p>By the way, why I'm doing this: I just want to SEE the console logs while testing stuff. Can't imagine it's actually THIS difficult to get to it. My tests are way too fast to manually open the console in time and I need to find a bug that happens every 100 tries. Opening the console 100 times is just way too tedious.</p>
  <p>Anyone have an idea?</p>