Control Chrome or Chromium easily.

Overview

Laravel Chromedriver

Control Chrome or Chromium easily.

Requirements

  • PHP 7.4 or latest
  • Laravel 8.x
  • Chrome or Chromium latest version

Installation

You can install the package via composer:

composer require masga/laravel-chromedriver

Usage

use Facebook\WebDriver\WebDriverBy;
use Masga\ChromeDriver\Facades\Browser;

Route::get('/browser', function () {
    Browser::start();

    // Get driver
    $driver = Browser::getDriver();

    // Go to URL
    $driver->get('https://en.wikipedia.org/wiki/Selenium_(software)');

    // Find search element by its id, write 'PHP' inside and submit
    $driver->findElement(WebDriverBy::id('searchInput')) // find search input element
        ->sendKeys('PHP') // fill the search box
        ->submit(); // submit the whole form

    // Find element of 'History' item in menu by its css selector
    $historyButton = $driver->findElement(
        WebDriverBy::cssSelector('#ca-history a')
    );

    $btnText = $historyButton->getText();

    // Terminate browser quickly. (optional)
    // Browser::quit();

    return 'About to click to a button with text: ' . $btnText;
});

Browser will quit automatically after the response is sent but you can quit quickly using Browser::quit()

Configuration

You can publish the config file using this command:

php artisan vendor:publish --tag=chromedriver-config

License

The MIT License. Please see License File for more information.

You might also like...
Cipi is a Laravel based cloud server control panel that supports Digital Ocean, AWS, Vultr, Google Cloud, Linode, Azure and other VPS.
Cipi is a Laravel based cloud server control panel that supports Digital Ocean, AWS, Vultr, Google Cloud, Linode, Azure and other VPS.

Cipi is a Laravel based cloud server control panel that supports Digital Ocean, AWS, Vultr, Google Cloud, Linode, Azure and other VPS. It comes with nginx, Mysql, multi PHP-FPM versions, multi users, Supervisor, Composer, npm, free Let's Encrypt certificates, Git deployment, backups, ffmpeg, fail2ban, Redis, API and with a simple graphical interface useful to manage Laravel, Codeigniter, Symfony, WordPress or other PHP applications. With Cipi you don’t need to be a Sys Admin to deploy and manage websites and PHP applications powered by cloud VPS.

A package that uses blade templates to control how markdown is converted to HTML inside Laravel, as well as providing support for markdown files to Laravel views.
A package that uses blade templates to control how markdown is converted to HTML inside Laravel, as well as providing support for markdown files to Laravel views.

Install Install via composer. $ composer require olliecodes/laravel-etched-blade Once installed you'll want to publish the config. $ php artisan vendo

Decoupled CMS for any Laravel app, gain control of: pages, blogs, galleries, events, images, custom modules and more.

Grafite CMS Grafite has archived this project and no longer supports or develops this code. We recommend using only as a source of ideas for your own

Control frontend access to properties/methods in Livewire using PHP 8 attributes.
Control frontend access to properties/methods in Livewire using PHP 8 attributes.

This package adds PHP 8.0 attribute support to Livewire. In specific, the attributes are used for flagging component properties and methods as frontend-accessible.

Panel de Control para Dominios
Panel de Control para Dominios

Panel de Control para Gestión de Dominios Esta aplicación permite la gestión interna de dominios de una manera sencilla. Podrás dar de alta dominios p

 Rafel is Remote Access Tool Used to Control Victims Using WebPanel With More Advance Features..
Rafel is Remote Access Tool Used to Control Victims Using WebPanel With More Advance Features..

Rafel is Remote Access Tool Used to Control Victims Using WebPanel With More Advance Features..

Panel de Control para Dominios
Panel de Control para Dominios

Panel de Control para Gestión de Dominios Esta aplicación permite la gestión interna de dominios de una manera sencilla. Podrás dar de alta dominios p

A Pest plugin to control the flow of time
A Pest plugin to control the flow of time

This Pest plugin offers a function testTime that allows you to freeze and manipulate the current time in your tests.

An authorization library that supports access control models like ACL, RBAC, ABAC in PHP .
An authorization library that supports access control models like ACL, RBAC, ABAC in PHP .

PHP-Casbin Documentation | Tutorials | Extensions Breaking News: Laravel-authz is now available, an authorization library for the Laravel framework. P

Command-line control panel for Nginx Server to manage WordPress sites running on Nginx, PHP, MySQL, and Let's Encrypt
Command-line control panel for Nginx Server to manage WordPress sites running on Nginx, PHP, MySQL, and Let's Encrypt

EasyEngine v4 EasyEngine makes it greatly easy to manage nginx, a fast web-server software that consumes little memory when handling increasing volume

A Theme Customizer control allowing selection and sorting of multiple images.

Multi Image Control (work in progress) A Theme customizer control allowing selection and sorting of multiple images. Currently under refactoring to ma

Source control integration plugin framework for MantisBT, including support for Github, Gitlab, Bitbucket, Gitweb, Cgit, Subversion, Mercurial and more

Source control integration plugin framework for MantisBT, including support for Github, Gitlab, Bitbucket, Gitweb, Cgit, Subversion, Mercurial and more

Dynamic ACL is a package that handles Access Control Level on your Laravel Application.

Dynamic ACL Dynamic ACL is a package that handles Access Control Level on your Laravel Application. It's fast to running and simple to use. Install an

This API provides functionality for creating and maintaining users to control a simple To-Do-List application. The following shows the API structure for users and tasks resources.
This API provides functionality for creating and maintaining users to control a simple To-Do-List application. The following shows the API structure for users and tasks resources.

PHP API TO-DO-LIST v.2.0 This API aims to present a brief to consume a API resources, mainly for students in the early years of Computer Science cours

System to control your app from site
System to control your app from site

ProgramManager System to control your app from site You can add more featutre and develop page you must use DataBase mysql 3 columns , 1 for id ( AI c

A powerful control panel search filter replacement for CraftCMS
A powerful control panel search filter replacement for CraftCMS

Omnisearch plugin for Craft CMS 3.x Omnisearch is a powerful control panel search filter replacement for the CraftCMS 3 control panel. Overview Do you

Minimalist PHP frame for Core-Library, for Developing PHP application that gives you the full control of your application.

LazyPHP lightweight Pre-Made Frame for Core-library Install Run the below command in your terminal $ composer create-project ryzen/lazyphp my-first-pr

A functional and simple rate limit control to prevent request attacks ready-to-use for PHP.

RateLimitControl A functional and simple rate limit control to prevent request attacks ready-to-use for PHP. Features: Prepared statements (using PDO)

Register ,Login , Logout , having access control
Register ,Login , Logout , having access control

Helo what's up dude read by the name of creator lov3yp :D This script is inspired by Lov3yp#2018 And Burak karahan Installation steps: !- Import the s

Releases(1.0.0)
Owner
Masga Satria Wirawan
Sailing with You Watanabe!
Masga Satria Wirawan
Instrument headless chrome/chromium instances from PHP

Chrome PHP This library lets you start playing with chrome/chromium in headless mode from PHP. Can be used synchronously and asynchronously! Features

Chrome PHP 1.7k Dec 30, 2022
ChromePhp - a PHP library for the Chrome Logger Google Chrome extension

ChromePhp - a PHP library for the Chrome Logger Google Chrome extension

Craig Campbell 1.4k Dec 30, 2022
Handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

PHP Console server library PHP Console allows you to handle PHP errors & exceptions, dump variables, execute PHP code remotely and many other things u

Sergey 1.4k Dec 25, 2022
Laravel 4.* and 5.* service providers to handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

Laravel 4.* service provider for PHP Console See https://github.com/barbushin/php-console-laravel/releases/tag/1.2.1 Use "php-console/laravel-service-

Sergey 73 Jun 1, 2022
Chrome extension to generate Laravel integration tests while using your app.

Laravel TestTools Check out the introduction post about the chrome extension. Installation git clone [email protected]:mpociot/laravel-testtools.git # i

Marcel Pociot 473 Nov 1, 2022
Magento Chrome Toolbar for MSP_DevTools

Magento Chrome Toolbar for MSP DevTools Magento Chrome Toolbar is a chrome extension to be used with MSP_DevTools for Magento 1 or Magento 2. This ext

MageSpecialist 308 Dec 10, 2022
BroRelo - Browser Auto Refresh / Reload for Firefox, Chrome & Opera

BroRelo - Browser Auto Refresh / Reload for Firefox, Chrome & Opera Ubuntu 21.10 | Apache/2.4.48 | PHP 8.0.18 This package can reload windows regardle

eypsilon 3 Jul 27, 2022
Easily interact and control your feature flags from Filament

Easily interact and control your feature flags from Filament

Ryan Chandler 32 Nov 29, 2022
Take control of your users in PHP

Disciple Take control of your users Installation Install via Composer: composer require decodelabs/disciple PHP version Please note, the final v1 rele

Decode Labs 3 Oct 18, 2022