title: Opening Gmail in a browser and logging into it automatically
body: <p>I want to open gmail automatially and login to it using the credentials.</p>
  
  <p>For this, I have written a .ps1 script which contains the following code :</p>
  
  <pre><code>set WshShell = WScript.CreateObject("WScript.Shell")
  call WshShell.Run("https://www.gmail.com", 1, false) 
  
  WScript.Sleep 2000
  WshShell.SendKeys "prudhvi"
  WScript.Sleep 1000
  WshShell.SendKeys "{TAB}"
  WScript.Sleep 1000
  WshShell.SendKeys "prudhvi9"
  WshShell.SendKeys "{TAB}"
  WScript.Sleep 1000
  WshShell.SendKeys "{ENTER}"
  WScript.Quit()
  </code></pre>
  
  <p>This throws the following error :</p>
  
  <pre><code>At C:\Users\admin\Desktop\sample.ps1:2 char:46
  + call WshShell.Run("https://www.gmail.com", 1, false)
  +                                              ~
  Missing expression after ','.
  At C:\Users\admin\Desktop\sample.ps1:2 char:47
  + call WshShell.Run("https://www.gmail.com", 1, false)
  +                                               ~~~~~
  Unexpected token 'false' in expression or statement.
  At C:\Users\admin\Desktop\sample.ps1:2 char:46
  + call WshShell.Run("https://www.gmail.com", 1, false)
  +                                              ~
  Missing closing ')' in expression.
  At C:\Users\admin\Desktop\sample.ps1:2 char:52
  + call WshShell.Run("https://www.gmail.com", 1, false)
  +                                                    ~ 
  Unexpected token ')' in expression or statement.
  At C:\Users\admin\Desktop\sample.ps1:13 char:14
  + WScript.Quit()
  +              ~
  An expression was expected after '('.
  + CategoryInfo          : ParserError: (:) [], ParseException
  + FullyQualifiedErrorId : MissingExpressionAfterToken
  </code></pre>
  
  <p>What might the error be?</p>