I have one fixture, "Page1" which I use a random word generator to create a named input box. I will need to use this variable on a different fixture, "Page2". How can I accomplish this? We can't use window for testcafe, and all efforts to export the result in a ReferenceError: fixture is not defined
error.
On Page 1, I have such code:
const words = require('random-words');
export let inputName;
fixture('Page1');
test('Create Page1', async (t) => {
await loginPage.login();
inputName = `input ${words()}`;
and on Page 2
import {inputName} from './page1';
if I take out the import statement everything works.