New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't login with Testcafe #2166
Comments
Hi @rahulrana1 Could you please provide a public URL or example application with which I can run the provided test code? |
Thank you for the provided information. I've reproduced the problem. |
Hi @miherlosev @LavrovArtem , Do you have any updates on this issue? |
We are still looking into this issue. You will be automatically notified once we make progress. |
Hello @rahulrana1, Data privacy is our top priority. For safety reasons, we did not save your data after our last attempt to find the cause of the issue. Could you please resend it? |
@LavrovArtem I have share the test data again with support@devexpress.com. |
Hi @rahulrana1 We received the data you sent. @LavrovArtem is investigating the issue right now. |
For team! A simplified example server: require('http')
.createServer((req, res) => {
if (req.url === '/') {
if (req.headers.host !== 'site.test.com:2020')
return res.end('Wrong request!');
res.writeHead(200, { 'content-type': 'text/html' });
res.end(`
<div id="cookie"></div>
<div><button id="signup">Sign up</button></div>
<script>
var cookieDiv = document.querySelector('#cookie');
var signupButton = document.querySelector('#signup');
document.cookie = 'session_id=1234567890; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT';
setInterval(function () {
cookieDiv.textContent = document.cookie;
}, 100);
signupButton.addEventListener('click', function () {
var iframe = document.createElement('iframe');
iframe.setAttribute('src', 'http://site.test.com:2020/signup');
document.body.appendChild(iframe);
});
</script>
`);
}
else if (req.url === '/signup') {
if (req.headers.host !== 'site.test.com:2020')
return res.end('Wrong request!');
res.writeHead(302, {
'set-cookie': 'session_id=1234567890; path=/',
'location': 'http://auth.test.com:2020/auth'
});
res.end();
}
else if (req.url === '/auth') {
if (req.headers.host !== 'auth.test.com:2020')
return res.end('Wrong request!');
res.writeHead(200, { 'content-type': 'text/html' });
res.end(`
<button id="auth">Auth</button>
<script>
document.querySelector('#auth').addEventListener('click', function () {
var xhr = new XMLHttpRequest();
xhr.addEventListener('load', function () {
window.location = 'http://site.test.com:2020/finish';
});
xhr.open('post', 'http://site.test.com:2020/xhr');
xhr.send();
});
</script>
`);
}
else if (req.url === '/xhr') {
if (req.headers.host !== 'site.test.com:2020')
return res.end('Wrong request!');
res.writeHead(200, {
'content-type': 'text/plain',
'set-cookie': 'session_id=0987654321; path=/',
'access-control-allow-origin': 'http://auth.test.com:2020'
});
res.end('ok!');
}
else if (req.url === '/finish') {
if (req.headers.host !== 'site.test.com:2020')
return res.end('Wrong request!');
res.writeHead(200, { 'content-type': 'text/html' });
res.end(`
<script>
parent.document.querySelector("#signup").parentNode.textContent = "${ req.headers.cookie !== 'session_id=1234567890' ? 'Failed!' : 'Success!' }";
parent.document.body.removeChild(frameElement);
</script>
`);
}
else
res.end();
})
.listen(2020, () => console.log('Open http://site.test.com:2020/')); Need to add two lines in the
|
@miherlosev @AndreyBelym Has this fix been released? |
Hi @rahulrana1 The fix will be available in the next public Testcafe release. |
awesome, thanks @AlexanderMoiseev |
We didn't establish the target date yet. And any personal estimate may be misleading, so I cannot currently tell you the precise date. |
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow. |
What is your Test Scenario?
Login to the application
What is the Current behavior?
Test cafe cannot login to the app
What is the Expected behavior?
Login works fine outside testcafe.
What is your web application and your TestCafe test code?
Given you the access via support email
Steps to Reproduce:
Your Environment details:
Your website URL (or attach your complete example):
Your complete test code (or attach your test files):
The text was updated successfully, but these errors were encountered: