zgetro/laravel-dusk-chromedriver 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zgetro/laravel-dusk-chromedriver

最新稳定版本:v1.1.1

Composer 安装命令:

composer require zgetro/laravel-dusk-chromedriver

包简介

A Laravel Artisan command to download matching ChromeDriver binaries for Windows, Linux, Mac, with WSL host detection support.

README 文档

README

🚗 Laravel ChromeDriver Downloader

A Laravel Artisan command that auto-magically detects your Chrome version, downloads the right ChromeDriver for Windows 🪟, Linux 🐧, and Mac 🍏 — with exclusive WSL support!

🧠 Smart · 🤖 Automated · ⚡ Fast · 🧩 Cross-Platform · 💻 WSL-Aware

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

🧩 Features

  • 🎯 Detects your Chrome version precisely
  • 💻 Supports downloading drivers for:
    • Windows (chromedriver-win64)
    • Linux (chromedriver-linux64)
    • macOS (chromedriver-mac-arm64 / mac-x64)
  • 🐧 WSL Smart Detection – detects Chrome version from Windows host
  • ⚙️ Stores drivers in .vendor/laravel/dusk/bin/
  • 🔀 Supports --all flag to download drivers for all OSes
  • ✅ Laravel 6–11 compatible
  • 🧪 PHPUnit support for testing the command

🚀 Installation

composer require zgetro/laravel-dusk-chromedriver --dev

🛠️ Usage

php artisan dusk:download-chromedriver

By default, this will:

  • Detect the local Chrome version
  • Download the matching ChromeDriver for your OS
  • Save it as .vendor/laravel/dusk/bin/chromedriver-[os]

🧬 Download All Drivers

php artisan dusk:download-chromedriver --all

This downloads all supported platform drivers — ideal for testing or CI.

⚙️ Environment Compatibility

OS Chrome Detection Method
Linux google-chrome --version / chromium-browser
macOS mdls metadata or standard version queries
Windows PowerShell: read .exe version
WSL PowerShell bridge to detect host Windows Chrome ✅

📦 Output Directory

All drivers are stored under:

.vendor/laravel/dusk/bin/

With friendly names:

  • chromedriver-win
  • chromedriver-linux
  • chromedriver-mac

🧪 Testing

composer test

Supports phpunit via Orchestra Testbench.

🧙 Behind the Scenes

Your Artisan command is your wand. This package just makes it magical.

The package:

  • etches your Chrome version using OS-specific logic
  • Queries official Chrome for Testing URLs
  • Extracts & renames the ChromeDriver zip content
  • Makes it executable where needed

🧰 Requirements

  • PHP 7.4 or newer
  • Laravel 6.x to 11.x
  • Internet access (to download drivers)

🧾 License

MIT © zgetro

💡 Contributing

PRs welcome! Feel free to submit issues, add test coverage, or request new features.

🐣 Fun Fact Did you know the ChromeDriver you use every day is based on the WebDriver protocol – a W3C standard? You’re not just testing… you’re browsing the web like a boss.
--Thanks CHATGPT--

统计信息

  • 总下载量: 12
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-21