for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace hipanel\tests\_support\Helper;
class PressButtonHelper extends \Codeception\Module
{
/**
* @param $textOnButton
* @throws \Codeception\Exception\ModuleException
*/
public function pressButton($textOnButton): void
$I = $this->getModule('WebDriver');
$I->click("//button[text() = '{$textOnButton}']");
$this->waitForPageUpdate();
}
* @param int $timeOut
public function waitForPageUpdate($timeOut = 60): void
$I->waitForJS("return $.active == 0;", $timeOut);