yanthink / browser
模拟浏览器
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 0
pkg:composer/yanthink/browser
Requires
- php: >=5.5.9
- facebook/webdriver: ~1.0
This package is not auto-updated.
Last update: 2025-10-08 14:48:21 UTC
README
安装
- 打开终端执行下面命令:
composer require yanthink/browser
- 使用
<?php namespace App\Console\Commands; use Illuminate\Console\Command; use Yanthink\Browser\Browser; use Yanthink\Browser\Simulation; class Test extends Command { public function handle(Simulation $simulation) { $simulation->browse(function (Browser $browser) { $browser->visit('http://localhost/foo') ->waitFor('#pass') ->type('pass', 'password') ->click('#sub') ->dump(); }); } }