title: How to automatically login to the website by Chrome with Applescript?
body: <p>I want to use Google Chrome for automatic login to the website (<a href="https://account.nicovideo.jp/login" rel="nofollow">https://account.nicovideo.jp/login</a>).</p>
  
  <p>I know how to use Applescript with Safari, but I don't know how should I script for Chrome.</p>
  
  <p>This is my Applescript for Safari's automatic login. How could I do the same thing with Chrome?</p>
  
  <hr>
  
  <pre><code>tell application "Safari"
      activate
      if URL of document 1 starts with "https://account.nicovideo.jp/login" or URL of document 1 starts with "https://secure.nicoga.jp/" then
          do JavaScript "document.forms[0].mail_tel.value='example@email.com'" in document 1
          do JavaScript "document.forms[0].password.value='password in here'" in document 1
          do JavaScript "document.forms[0].submit()" in document 1
      end if
  end tell
  </code></pre>