paazakharov / yii2-selenium-tools
用于与Selenium自动化一起使用的实用工具
0.0.3
2022-10-30 16:29 UTC
Requires
- php: >=7.4
- php-webdriver/webdriver: ^1.12
- ramsey/uuid: ^4.2
- sapistudio/seleniumstealth: ^1.0
- spatie/crawler: ^6.0
- yidas/yii2-composer-bower-skip: ~2.0.13
- yiisoft/yii2: ~2.0.45
- yiithings/yii2-dotenv: ^1.0
Requires (Dev)
- codeception/codeception: ^4.2
- codeception/module-asserts: ^1.0
- codeception/module-phpbrowser: ^1.0.0
- codeception/module-yii2: ^1.0
- yiisoft/yii2-gii: ^2.2
This package is auto-updated.
Last update: 2024-09-28 09:04:17 UTC
README
安装
- 将仓库添加到composer.json
"repositories": [ ...// any other repositories { "type": "vcs", "url": "git@github.com:pazakharov/yii2-selenium-tools.git" } ...// any other repositories ]
- 通过composer安装或添加记录到composer.json
composer require pazakharov/yii2-selenium-tools
- 根据示例配置配置模块到yii2应用程序
[ // ... 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' ], ] ] ]
贡献和开发此项目
- 代码格式规则基于PSR-12 ./phpcs.xml
- 为了运行测试,您应该运行迁移
.\vendor\bin\yii migrate/up --appconfig=Tests/config/yii2.php