0

Writing a small test for my website. However, my browser works way to slow for my test so I need a short 'timeout' while everything loads there. I tried to used .wait(secs), but I receive an error:

[RuntimeException] Call to undefined method AcceptanceTester::wait

Here's everything what I got from my code:

class LoginCest
{

public function successFirstTest(AcceptanceTester $I)
{
$I->wantTo("Create test case for login");
        $I->amOnPage('link');
//        $I->wait(5); 
        $I->see("wow");
        $I->fillField("//input[@name='userIdentifier']", 'myEmail');
        $I->click("//button[contains(text(),'Prisijungti')]");
        $I->wait(10);
        $I->see("thEText");
}
}

yml file: enter image description here

HenrikasB
  • 321
  • 1
  • 9
  • 1
    https://stackoverflow.com/questions/36093658/codeception-runtimeexception-call-to-undefined-method-acceptancetesterwait – Vahe Shak Feb 25 '19 at 16:34
  • Still receiving an error. Updated my post with more pictures – HenrikasB Feb 25 '19 at 16:49
  • @VaheShak I've tried to change class_name to same as .php class,but still received same problem. – HenrikasB Feb 25 '19 at 16:53
  • Have you tried using waitForText() instead of wait()? – Vahe Shak Feb 25 '19 at 17:01
  • Yea I've tried, received: [RuntimeException] Call to undefined method AcceptanceTester::waitForText.. As I understand those functions should work by default,no? – HenrikasB Feb 25 '19 at 17:02
  • Delete `class_name` setting, it is an old name od `actor` setting, so don't mess with it without a good reason. The value should be `AcceptanceTester`. – Naktibalda Feb 26 '19 at 08:09

0 Answers0