|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/irtiweb/CATS/vendor/behat/mink-selenium2-driver/tests/Custom/ |
Upload File : |
<?php
namespace Behat\Mink\Tests\Driver\Custom;
use Behat\Mink\Tests\Driver\TestCase;
class TimeoutTest extends TestCase
{
/**
* @expectedException \Behat\Mink\Exception\DriverException
*/
public function testInvalidTimeoutSettingThrowsException()
{
$this->getSession()->getDriver()->setTimeouts(array('invalid' => 0));
}
public function testShortTimeoutDoesNotWaitForElementToAppear()
{
$this->getSession()->getDriver()->setTimeouts(array('implicit' => 0));
$this->getSession()->visit($this->pathTo('/js_test.html'));
$this->findById('waitable')->click();
$element = $this->getSession()->getPage()->find('css', '#waitable > div');
$this->assertNull($element);
}
public function testLongTimeoutWaitsForElementToAppear()
{
$this->getSession()->getDriver()->setTimeouts(array('implicit' => 5000));
$this->getSession()->visit($this->pathTo('/js_test.html'));
$this->findById('waitable')->click();
$element = $this->getSession()->getPage()->find('css', '#waitable > div');
$this->assertNotNull($element);
}
}