highscore/browser
Composer 安装命令:
composer require highscore/browser
包简介
A chromedriver / laravel dusk extension with a few extra utilities
README 文档
README
This packages adds several methods to the laravel dusk browser. Also makes easy to instance a new browser with a builder pattern.
Instalation
composer require highscore/browser
Usage
<?php use Laravel\Dusk\Browser; $browser = Browser::configure() ->headless() ->singleProcess() ->host('http://127.0.0.1') ->port(9515) ->enableRequestLog() ->storeScreenshotsAt(storage_path('app/')) ->size(1280, 720) ->agent('MyCustomAgent 1.0') ->proxy('http://proxyurl:9510') ->allowDownloadsTo('/tmp') ->grantAllPermisions('http://www.google.com') ->lang('es') ->make(); dump($browser->visit('http://www.google.com') ->javascript('return document.title')); $browser ->waitDocumentLoad() ->waitFontLoad() ->waitForVisible('//img') ->waitForClickable('button') ->transparentScreenshot('transparent-screenshot'); dump($browser->getNetworkEvents()); dump($browser->html());
Running tests
Start a chromedriver on 127.0.0.1:9515 and run phpunit
统计信息
- 总下载量: 1.47k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-07-24