php&;Selenium-Firefox始终打开欢迎页面(FF 49.0.2,SE 2.53.1)

php&;Selenium-Firefox始终打开欢迎页面(FF 49.0.2,SE 2.53.1),php,selenium,firefox,selenium-webdriver,webdriver,Php,Selenium,Firefox,Selenium Webdriver,Webdriver,我已经阅读并回答了有关Stackoverflow的问题。和。我也读过。我也发现了同样不能解决我问题的方法 我正在Windows 10上使用Selenium 2.53.1和FF 49.0.2。这是我为Facebook Webdriver编写的代码,基本上是他们的示例,只是通过配置文件设置进行了扩展: $profile = new FirefoxProfile(); $profile->setPreference('browser.startup.homepage_override.mston

我已经阅读并回答了有关Stackoverflow的问题。和。我也读过。我也发现了同样不能解决我问题的方法

我正在Windows 10上使用Selenium 2.53.1和FF 49.0.2。这是我为Facebook Webdriver编写的代码,基本上是他们的示例,只是通过配置文件设置进行了扩展:

$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/');
但我还是明白了这一点:


我做错什么了吗?

mston
的末尾缺少一个
e
。我还将
浏览器.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);

mston
末尾缺少一个
e
。我还将
浏览器.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);

非常感谢。愚蠢的打字错误。。。我猜我没有完全复制和粘贴字符串。。。现在我进入下一期。。。让Selenium在这个系统上工作并不有趣(Facebook\WebDriver\Exception\WebDriverException:http POST to/session与参数:谢谢!愚蠢的打字错误…我想我没有完全复制并粘贴字符串…现在我遇到下一个问题…让Selenium在这个系统上工作一点也不有趣。)(Facebook\WebDriver\Exception\WebDriverException:http POST to/session带参数时引发Curl错误: