2016-11-02 4 views
1

私はthis questionと答えました。そして、this page。私もthis pageを読んだ。私もthis issue私の問題を解決していない見つけることがあります。php&Selenium - Firefoxはいつもウェルカムページを開きます(FF 49.0.2、SE 2.53.1)

$profile = new FirefoxProfile(); 
$profile->setPreference('browser.startup.homepage_override.mston', 'ignore'); 
$profile->setPreference('startup.homepage_welcome_url.additional', 'about:blank'); 
$profile->setPreference('browser.startup.homepage', 'about:blank'); 
$profile->setPreference('xpinstall.signatures.required', false); 

$capabilities = DesiredCapabilities::firefox(); 
$capabilities->setCapability(FirefoxDriver::PROFILE, $profile); 

$driver = RemoteWebDriver::create('http://localhost:4444/wd/hub', $capabilities, 4444); 

$driver->get('http://docs.seleniumhq.org/'); 

しかし、私:私は、Windows 10上でセレン2.53.1、FF 49.0.2を使用してい

は、ここでは基本的に自分だけのプロファイル設定により拡張の例ですが、Facebookのwebdriverをのために私のコードです私が何か間違ったことをやって

image

アム:まだこれを取得「メートル?

答えて

0

mstonの末尾にeがありません。 browser.usedOnWindows10をtrueに設定します。

$profile = new FirefoxProfile(); 
$profile->setPreference('browser.startup.page', 0); 
$profile->setPreference('browser.startup.homepage', 'about:blank'); 
$profile->setPreference('browser.startup.homepage_override.mstone', 'ignore'); 
$profile->setPreference('browser.usedOnWindows10', true); 
$profile->setPreference('xpinstall.signatures.required', false); 
+0

ありがとうございました!愚かなタイプミス...私は文字列を完全にコピーして貼り付けなかったと思います...今は次の問題に取り掛かりました...このシステムでSeleniumを動作させることは楽しいことではありません。 :(Facebook \ WebDriver \ Exception \ WebDriverCurlException:http POSTの/セッションとのparamsでのCurlエラーがスローされました: – burzum

関連する問題