PHP code example of lireincore / webdriver

1. Go to this page and download the library: Download lireincore/webdriver 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/ */

    

lireincore / webdriver example snippets


// This would be the url of the host running the server-standalone.jar
$host = 'http://localhost:4444/wd/hub'; // this is the default

    $driver = RemoteWebDriver::create($host, DesiredCapabilities::firefox());
    

    $driver = RemoteWebDriver::create($host, DesiredCapabilities::chrome());
    

$desired_capabilities = DesiredCapabilities::firefox();
$desired_capabilities->setCapability('acceptSslCerts', false);
$driver = RemoteWebDriver::create($host, $desired_capabilities);