title: Selenium (Powershell) Run as a different user
body: <p>I want to start Selenium (Google Chrome - WebDriver) as a different user and I am pretty much lost as I don't know where to add $mycreds. This is quite easy to achieve if I want to start a normal Chrome session, however, I am stuck when it comes to achieving this using Selenium. Any advice ?</p>
  <pre><code>$username = &quot;domain\name&quot;
  $password = ConvertTo-SecureString &quot;password&quot; -AsPlainText -Force
  $mycreds = New-Object System.Management.Automation.PSCredential -ArgumentList $username, $password
  $Driver = Start-SeChrome
  Enter-SeUrl -Url 'https://www.google.com/' -Driver $Driver
  </code></pre>
  <p>If I try to pass it along using -Arguments , it will still use my account to open the browser without returning any error.</p>
  <pre><code>$Driver = Start-SeChrome -Arguments $mycreds
  </code></pre>