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.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespaceTests;
useModelizer\Selenium\SeleniumTestCase;
classSeleniumExampleTestextendsSeleniumTestCase{
/**
* A basic functional test example.
*
* @return void
*/publicfunctiontestBasicExample(){
// 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
*/publicfunctiontestLoginFormExample(){
$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.