PHP code example of andiwijaya / dusk-secure
1. Go to this page and download the library: Download andiwijaya/dusk-secure library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
andiwijaya / dusk-secure example snippets
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$event = new \Tests\Browser\Test;
$event->prepare();
$event->testExample();
}
use Facebook\WebDriver\Chrome\ChromeOptions;
/**
* Create the RemoteWebDriver instance.
*
* @return \Facebook\WebDriver\Remote\RemoteWebDriver
*/
protected function driver()
{
$options = (new ChromeOptions)->addArguments(['--headless']);
return RemoteWebDriver::create(
'http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
ChromeOptions::CAPABILITY, $options
)
);
}