PHP code example of lionmm / laravel-ff-webdriver

1. Go to this page and download the library: Download lionmm/laravel-ff-webdriver 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/ */

    

lionmm / laravel-ff-webdriver example snippets


'providers' => array(

    ...
    LionMM\WebDriver\WebDriverServiceProvider::class,
),

'aliases' => array(

    ...
    'WebDriver' => LionMM\WebDriver\Facades\WebDriver::class,
),



use LionMM\WebDriver\WebDriver;

class Foo {

    public function Bar()
    {
        $webDriver = \App::make('webdriver'); // use \App::make for DI and 'webdriver' for singleton
    }
}



use LionMM\WebDriver\WebDriver;

class Foo {

    /** @var WebDriver  */
    private $webDriver;

    public function __construct(WebDriver $webDriver)
    {
        $this->webDriver = $webDriver;
    }
}



\WebDriver::initDriver(['lang' => 'en', 'no-flash' => true, 'proxy' => '220.155.15.133:8080'], 50000);




\WebDriver::initDriver(['accept_languages' => 'ru-RU,ru,en,en-US,uk', 'no-flash' => false, 'proxy' => '220.155.15.133:8080'], 50000, 'http:hub.site:5555/wd/hub');