TestCafe addresses these scenarios by providing a convenient way to isolate import { Role } from 'testcafe'; const regularAccUser = Role('http://example.com/login', async t => { await t . After you create the roles, you can switch between users at any moment except for the Roles can be shared across tests and fixtures..