You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use Testcafe as an alternative to Webdriver, and to speed up the tests I want to persist the user login session. I tried to use auto login plugin, as I use it successfully with the Webdriver, but in the saved file from the plugin (writeUser_session.json) I only can see the "undefined". I did not find any open issues for this and my expectation is that this is a valid flow. Is there something that I am missing?
Configuration is simple without any customizations. This is the config file auto login part:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I am trying to use Testcafe as an alternative to Webdriver, and to speed up the tests I want to persist the user login session. I tried to use auto login plugin, as I use it successfully with the Webdriver, but in the saved file from the plugin (writeUser_session.json) I only can see the "undefined". I did not find any open issues for this and my expectation is that this is a valid flow. Is there something that I am missing?
Configuration is simple without any customizations.
This is the config file auto login part:
autoLogin: { enabled: true, saveToFile: true, inject: 'loginAs', users: { writeUser: { login: async (I) => { I.amOnPage("https://login url") I.fillField('email', "user@test.com") I.pressKey('Enter') I.fillField('password', '*****') I.pressKey('Enter') }, check: async (I) => { I.amOnPage('/') I.seeCurrentUrlEquals('https://test page url/'); }, fetch: () => {}, // empty function restore: () => {} // empty function } } } }This is the test scenario:
Scenario("test 2", async ({I,loginAs}) => { await loginAs('writeUser') I.amOnPage('/') I.see('find this text') })Beta Was this translation helpful? Give feedback.
All reactions