PHP code example of pagamastarde / selenium-form-utils

1. Go to this page and download the library: Download pagamastarde/selenium-form-utils 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/ */

    

pagamastarde / selenium-form-utils example snippets


composer 




// Once the webDriver of selenium is inside Pagantis form, basically:
// $webdriver->getCurrentUrl == 'form.pagantis.com/....'
// Then you can use this tool to finish the form:

SeleniumHelper::finishForm($this->webDriver);

//The method will end once the form is approved, so the current URL will be OK_URL of the order
//Optionally you can also send the mobilePhone if the user is returning

SeleniumHelper::finishForm($this->webDriver, '600123123');




SeleniumHelper::cancelForm($this->webDriver);

bash
docker-compose up -d

docker-compose exec php php-7.1 vendor/bin/phpunit