1. Go to this page and download the library: Download modelizer/selenium 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/ */
namespace Tests;
use Modelizer\Selenium\SeleniumTestCase;
class SeleniumExampleTest extends SeleniumTestCase
{
/**
* A basic functional test example.
*
* @return void
*/
public function testBasicExample()
{
// This is a sample code you can change as per your current scenario
$this->visit('/')
->see('Laravel')
->hold(3);
}
/**
* A basic submission test example.
*
* @return void
*/
public function testLoginFormExample()
{
$loginInput = [
'username' => 'dummy-name',
'password' => 'dummy-password'
];
// Login form test case scenario
$this->visit('/login')
->submitForm('#login-form', $loginInput)
->see('Welcome'); // Expected Result
}
}
vendor/bin/steward run staging chrome
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.