12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- use Codeception\Util\Locator;
- include ('variables.php');
- # comando para correr el test: php ./vendor/bin/codecept run --steps tests/acceptance/1_baseCest.php
- class BaseCest
- {
- public function frontpageWorks(AcceptanceTester $I)
- {
- $user= $_GET['USER'];
- $pass= $_GET['PASS'];
- shell_exec('mkdir -p ./tests/_output/debug/screen/');
- #log in
- #var_dump($I->see("UserName"));die();
- try{
- $I->amOnPage('/');
- $I->fillField('username', $user);
- $I->fillField('psd', $pass);
- $I->click('Login');
- $I->wait('3');
- }catch(\Exception $e){
- $I->makeScreenshot('screen/0_login');
- }
- # Catv
- try{
- $I->amOnPage('/catv.asp');
- $I->wait('3');
- $I->click("(//*[@name='catv_enabled'])");
- $I->wait('5');
- $I->click('Apply Changes');
- $I->wait('5');
- $I->see('Change setting successfully!');
- $I->click('OK');
- }catch(\Exception $e){
- $I->makeScreenshot('screen/6_action');
- }
- $I->wait('3');
- $I->amOnPage('/boaform/admin/formLogout');
- }
- }
|