CodeceptJS
CodeceptJS copied to clipboard
Not working on LinkedIn
"codeceptjs": "^2.0.4",
"puppeteer": "^1.12.2"
Feature("Login");
Scenario("Login", I => {
I.amOnPage("https://www.linkedin.com/");
I.wait(2);
I.fillField("input#login-email", "XXXXXXXXXXXXX");
I.wait(2);
I.fillField("input#login-password", "XXXXXXXXXXXXXX");
I.wait(2);
I.click("#login-submit");
});
Output:
Field "input#login-email" was not found by text|CSS|XPath
The same code passes a few times, but most of the times it fails.
are you sure you wait enough?
Yep. Pretty sure.
you should use
Scenario("Login", async (I) => { and await I.wait(2) for this case.
but using I.wait(..) is not the best practice. You should use I.waitForVisible then I.fillField