Issue
Is there any possible reason for await t.expect(Selector().exists).ok()
to throw TypeError: Cannot read property '0' of null
? It happens sporadically so it's hard to track down but my understanding is that if the Selector is not present in the DOM tree then it should wait the timeout and throw an expected boolean to be boolean if not found error. I know I'm not providing much to go on but I'm unable to reproduce the issue on a production facing website. Any help would be greatly appreciated.
Edit: This is on version 1.18.3 of TestCafe but I'm uncertain if it happens in other versions as well.
Solution
While I didn't discover the root cause of the failure, wrapping the expect methods in a retry has completely eliminated the error. I'll update this topic if I get any additional information around the original issue.
Answered By - Todd Glover
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.