forked from php-webdriver/php-webdriver
-
Notifications
You must be signed in to change notification settings - Fork 0
ChromeOptions
Wai Hon Law edited this page May 21, 2014
·
6 revisions
ChromeOptions is the class managing the chrome capabilities. You can find more details in https://sites.google.com/a/chromium.org/chromedriver/extensions. Here is the guide of using ChromeOptions in facebook/php-webdirver.
$options = new ChromeOptions();
// Setting the binary is optional.
$options->setBinary('/home/php-webdirver/chrome/my_chrome_binary');
// Setting extensions is also optional
$options->addExtensions(array(
'/path/to/chrome/extension1.crx',
'/path/to/chrome/extension2.crx',
));
$caps = DesiredCapabilities::chrome();
$caps->setCapability(ChromeOptions::CAPABILITY, $options);
$driver = RemoteWebDriver::create($url, $caps);