PHP code example of pazakharov / yii2-selenium-tools

1. Go to this page and download the library: Download pazakharov/yii2-selenium-tools 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/ */

    

pazakharov / yii2-selenium-tools example snippets


[
    // ... other app config
'modules' => [
        'seleniumTools' => [
            'class' => \Zakharov\Yii2SeleniumTools\SeleniumToolsModule::class,
            'screenshotPath' => '@app/runtime/screenshots',
            'defaultChromeBinary' => env('CHROME_BINARY_PATH', null),
            'defaultWebdriverBinary' => env('CHROME_DRIVER_EXECUTABLE', null),
            'params' => [
                'headless' => false,
                'profilesDirectory' => '@app/runtime/profiles',
                'chromeDriverPortMin' => env('CHROME_DRIVER_PORT_MIN', null),
                'chromeDriverPortMax' => env('CHROME_DRIVER_PORT_MAX', null),
                'executorConnectionTimeoutMs' => env('CHROME_EXECUTOR_CONNECTION_TIMEOUT_MS', 120000),
                'executorRequestTimeoutMs' => env('EXECUTOR_REQUEST_TIMEOUT_MS', 120000),
                'PageLoadTimeTimeoutS' => env('PAGE_LOAD_TIME_TIMEOUT_S', 120),
            ]
        ]
    ],
    'controllerMap' => [
        'migrate' => [
            'class' => 'yii\console\controllers\MigrateController',
            'migrationPath' => [
                '@vendor/pazakharov/yii2-selenium-tools/Src/migrations'
                ],
        ]
    ]
]
bash
    .\vendor\bin\yii migrate/up --appconfig=Tests/config/yii2.php