Scripting Automation of Chrome Actions

Chrome Setup:

The default browser based install of the Chrome installs browser for that user only.  To have chrome installed for all users and be able to manage it, you have to install a standalone version of Chrome browser that installs for all users on a system.

 

Browser based install places chrome in:

C:Users<username>AppDataLocalGoogleChromeApplicationchrome.exe

Standalone installer places chrome in:

"C:Program Files (x86)GoogleChromeApplicationchrome.exe"

 

Scripting Automation:

To start Chrome with launch/load of a website automatically:

  1. Start chrome exe with URL, examples below:
    1. "C:Program Files (x86)GoogleChromeApplicationchrome.exe" www.microsoft.com
    2. "C:Program Files (x86)GoogleChromeApplicationchrome.exe" http://www.microsoft.com/en-us/default.aspx
    3. "C:Program Files (x86)GoogleChromeApplicationchrome.exe" http://testserver/mysite/logon.aspx
  2. launch the shortcut with the URL as parameter to the target executable as shown below:
    1. Shortcut target: "C:Program Files (x86)GoogleChromeApplicationchrome.exe" http://localhost/myapp/

 

    Automatically sending keyboard/mouse keys/clicks to chromes pages: 

  1. Activating the Chrome browser window or setting Chrome as active window
    1. shell.appactivate("<URL name> – Google Chrome")
  2. Currently Chrome has bugs sending automated keys

Leave a Reply

Your email address will not be published. Required fields are marked *