Open Elverslane opened 4 years ago
I.waitForText
doesn't support calling with text
and locator
only, because sec
isn't the last parameter: https://codecept.io/helpers/Puppeteer/#waitfortext
If you don't want to specify sec
and take it from your config, you can do it this way (I use it with WebDriver, but I guess it will work will Puppeteer too if you change the helper's name):
Test_test.js:
I.waitForText(text, commonStep.getWaitTimeoutInSec(), locator)
Common.js:
module.exports = {
getWaitTimeoutInSec() {
return require("codeceptjs").config.get().helpers.WebDriver.waitForTimeout / 1000;
}
};
Im trying to use
waitForText
method withtext
andlocator
arguments withoutsec
because its already declared incodecept.conf
AND it just freezes. No error, exception and etc. But if I clearly write
sec
all will be fine. its likeI.waitForText(text, 6, locator)
- workI.waitForText(text, locator)
- doesn't workDetails