Hi there
I am having problems with an authenticated page!
Let's say I have a url X which loads a page that requires authentication. Login can be performed on page at url Y.
Normal behaviour is the following:
- you go to X without authentication and you get redirected to Y.
- you go to Y when authenticated and you get redirected to X.
Now... what I am doing with nightwatch is the following:
browser
.setCookie(authenticatedCookieContentPreviouslyObtained)
.url(X);
Unfortunately I get redirected to page Y even though, theoretically, the cookie is set and page X should be accessible.
The content of the cookie is valid as I tested it by hand adding the cookie to a non authenticated browser which can then magically access the page once the cookie is added via firebug.
Any idea?