import { Selector } from 'testcafe';
const toast = '#toast-id'; // or `const toast = Selector('#toast-id');`
// ... later in your tests:
await takeSnapshot(toast);
The syntax you used for t.selector[toast] is not valid, as there is no t.selector API available, which I am think is your issue. I mean, a selector is a concept explained by Testcafé itself, and is not an issue within this library if you're not familiar with.
A
selector
is a string orSelector
instance, e.g.The syntax you used for
t.selector[toast]
is not valid, as there is not.selector
API available, which I am think is your issue. I mean, a selector is a concept explained by Testcafé itself, and is not an issue within this library if you're not familiar with.