get browser args fropm config

This commit is contained in:
James
2019-09-22 08:55:21 +01:00
parent 52f1363745
commit f9cb9aac4c
2 changed files with 14 additions and 5 deletions

View File

@@ -6,7 +6,9 @@ abstract class BrowserTest extends \PHPUnit_Extensions_Selenium2TestCase{
public function setUp(){
$this->setHost('localhost');
$this->setPort(4444);
$this->setDesiredCapabilities(['moz:firefoxOptions'=>['args'=>['-headless','screenshot','window-size='.getenv('SeleniumWindowSize')]]]);
$args=explode(',',getenv('SeleniumBrowserArgs'));
$args[]='screenshot';
$this->setDesiredCapabilities(['moz:firefoxOptions'=>['args'=>$args]]);
$this->setBrowserUrl(getenv('SeleniumBrowserUrl'));
$this->setBrowser(getenv('SeleniumBrowser'));
}