The simpliest way to run Chrome is:
ipmo [path]\SePSX.dll
There are also two options to customize its start. First, you can change the folder whence the browser starts (for example, you have downloaded a dev version of Chrome from and installed it to the folder C:\Portable\GoogleChromePortableDev). All what you need to do is to put chromedriver.exe into this folder and rename GoogleChromePortable.exe to chrome.exe and, voila, your Selenium works with the version of Chrome your colleagues never saw:
Start-SeChrome -DriverDirectoryPath C:\Portable\GoogleChromePortableDev
or, interchangeable,
Start-SeChrome -DriverDirectoryPath C:\Portable\GoogleChromePortableDev\

You can also add options to your Chrome. First, create a ChromeOptions object. Second, set up your object. And, third, attach it to the driver.
# the first and second steps:
$opt = New-SeChromeOptions | Add-SeChromeExtension -ExtensionList ext1,ext2
# the third step is to combine options with driver:
Start-SeChrome -ChromeOptions $opt;
Alternatively, the same could be written as:
Start-SeChrome -ChromeOptions (New-SeChromeOptions | Add-SeChromeExtension -ExtensionList ext1,ext2)

Last edited Jan 3, 2013 at 6:10 PM by xinliu, version 4


No comments yet.