PHP code example of mcmatters / chrome-tester

1. Go to this page and download the library: Download mcmatters/chrome-tester library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mcmatters / chrome-tester example snippets




declare(strict_types=1);

use Facebook\WebDriver\WebDriverBy;
use McMatters\ChromeTester\Browser;

ement(WebDriverBy::cssSelector('input[name=q]'))
    ->clear()
    ->sendKeys('Test');

$site->findElement(WebDriverBy::cssSelector('form'))->submit();

echo $site->getPageSource();