allow selenium host/port to be specified in env
This commit is contained in:
parent
7d3fb69463
commit
374ddd1560
@ -9,8 +9,14 @@ namespace JHodges\PHPUnitBase;
|
||||
abstract class BrowserTest extends \PHPUnit_Extensions_Selenium2TestCase{
|
||||
|
||||
public function setUp(){
|
||||
$this->setHost('localhost');
|
||||
$this->setPort(4444);
|
||||
if(! $host=getenv('SeleniumHost')){
|
||||
$host='localhost';
|
||||
}
|
||||
if(! $port=getenv('SeleniumPort')){
|
||||
$port='4444';
|
||||
}
|
||||
$this->setHost($host);
|
||||
$this->setPort($port);
|
||||
$args=explode(' ',getenv('SeleniumBrowserArgsVal'));
|
||||
$args[]='screenshot';
|
||||
$this->setDesiredCapabilities([getenv('SeleniumBrowserArgsKey')=>['args'=>$args]]);
|
||||
|
Loading…
Reference in New Issue
Block a user