mcmatters / chrome-tester
v1.0
2018-03-08 11:45 UTC
Requires
- php: >=7.0
- facebook/webdriver: ^1.5
- symfony/process: ^3.1 || ^4.0
Requires (Dev)
- codeclimate/php-test-reporter: ^0.4.4
- phpunit/phpunit: >=6.0
This package is auto-updated.
Last update: 2024-11-06 20:04:47 UTC
README
Simple wrapper over chrome web driver.
Installation
composer require mcmatters/chrome-tester --dev
Usage
<?php declare(strict_types=1); use Facebook\WebDriver\WebDriverBy; use McMatters\ChromeTester\Browser; require 'vendor/autoload.php'; $chrome = Browser::make()->getChromeDriver(); $site = $chrome->get('https://google.com'); $site->findElement(WebDriverBy::cssSelector('input[name=q]')) ->clear() ->sendKeys('Test'); $site->findElement(WebDriverBy::cssSelector('form'))->submit(); echo $site->getPageSource();