答案 0 :(得分:2)
你可能想要覆盖TestCase::driver
这样的功能:
protected function driver()
{
// iPhone 6, for instance
$ua = 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1';
$capabilities = DesiredCapabilities::chrome();
$options = new ChromeOptions;
$options->setExperimentalOption('mobileEmulation', ['userAgent' => $ua]);
return RemoteWebDriver::create(
'http://localhost:9515', $options->toCapabilities()
);
}
答案 1 :(得分:0)
实际上,Massan的答案是部分正确的,但实际上并没有给出应像这样的示例:
/var/lib/postgresql/data/PG_VERSION