I
I
iPhil2016-03-03 19:02:11
JavaScript
iPhil, 2016-03-03 19:02:11

Does js work in codeception?

I'm trying to test a login page with e-mail and password validation. Validation goes through js, if errors are noticed, they are displayed in .

$I->fillField("username", "d");
        $I->fillField("password", "00000000");
        $I->click("signin");
        $I->seeElement("#jserror_input-login",["style" => "clear:both;padding-left:100px;"]);

A test error occurs, although style should be like this, but for some reason it does not change and remains like this:
display:none;clear:both;padding-left:100px

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aleksandr Novikov, 2016-12-09
@real_kasp

If you need to use js in codeception, you need a web driver (+ firefox or phantomJS), there is an executeJS method, always when other methods do not work correctly, I use it in conjunction with jquery

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question