forked from php-webdriver/php-webdriver
-
Notifications
You must be signed in to change notification settings - Fork 0
FirefoxProfile
Wai Hon Law edited this page May 30, 2014
·
4 revisions
FirefoxProfile is the class managing the firefox profile. You can find more details in https://code.google.com/p/selenium/wiki/FirefoxDriver. Here is the guide of using FirefoxProfile in facebook/php-webdirver.
$profile = new FirefoxProfile();
// Let's set the start up home page to github.com/facebook/php-webdriver !
$profile->setPreference(
'browser.startup.homepage',
'https://github.com/facebook/php-webdriver/'
);
This page includes other useful preferences. http://kb.mozillazine.org/About:config_entries
$profile->addExtension('/path/to/firefox/extension1.xpi')
->addExtension('/path/to/firefox/extension2.xpi');
$caps = DesiredCapabilities::firefox();
$caps->setCapability(FirefoxDriver::PROFILE, $profile);
$driver = RemoteWebDriver::create($url, $caps);