Search code examples
google-chromee2e-testingtestcafeuser-rolesbrowser-automation

TestCafe - User Profile and Log In


I have a scenario where I need to use the current user chrome profile. I expected that I don't need to log in to web app. I thought TestCafe would use stored credentials. But all tests are redirected to login page. I launch testcafe tests with flag chrome:userProfile.

How could I run tests and use stored credentials in the browser?


Solution

  • TestCafe uses its own Roles mechanism to authenticate users. The login steps are executed only once during the first Role usage. Next time TestCafe restores the logged in user automatically.