Skip to content

Driver configuration

Julien Gidel edited this page Mar 9, 2021 · 4 revisions

You can configure the behavior of the WebDriver thanks to the Automate\Driver\DriverConfiguration class

Options

This is all the options the DriverConfiguration gives you :

$driverConfiguration = new DriverConfiguration();
//Set an HttpProxy
$driverConfiguration->setHttpProxy('0.0.0.0', 1234);
//You can define a FirefoxProfile. This case is an example that does nothing
$driverConfiguration->setFirefoxProfile(new FirefoxProfile());
//Specify the driver/server address
$driverConfiguration->setServerUrl('http://localhost:4444');
//Run the driver in headless mode only supported by chrome for the moment
$driverConfiguration->headlessMode();

Now set the driver configuration to AutoMate :

$autoMate = new AutoMate($config);
$autoMate->setDriverConfiguration($driverConfiguration);

Clone this wiki locally