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
XMLHttpRequest Content-Type header is not set in native-automation mode in Angular application #7645
Comments
Thank you for reaching out to us. We would like to help you diagnose the cause of the issue. However, we need a simple sample that we can easily run on our side in order to replicate the issue. I know that you mentioned you couldn't share your project, but perhaps you can send it privately to support@devexpress.com. |
Hi @AlexKamaev, I have mailed and shared a working example privately. |
@di5ko I managed to reproduce the issue. Thank you for your cooperation. |
I was able to reproduce the issue in a simple Angular project. It is related to the interaction between the HttpClient of Angular and the chrome-devtools-protocol library. Request headers are not set correctly. This leads to incorrect data definition in the payload. We will investigate this issue and update this ticket as soon as we have any results. |
Duplicate of #7664 |
What is your Scenario?
After updating Testcafe to the latest version, I have a failing test when running it with the
--native-automation
flag. Without the flag, the test passes.The assertion checks for a warning alert ("Bad username/password") to pop up inside our authentication modal. The
div
containing the alert shows up directly after pressing the submit button and is visible for about 3 seconds before disappearing again.Edit: I have also found that the next test (valid login) is failing; when entering a valid username and password in the input fields and clicking the submit button, the application returns that no username and password are provided while I can see them being typed in. It's an error/alert I can't reproduce manually.
Furthermore, I have found that screenshots made when using a test runner are all empty (white), but if I run the test manually from the command line I do get proper screenshots. All in all, 2.5.x seems really buggy for me, so I am reverting the upgrade for now.
What is the Current behavior?
Test failing when running it with the
--native-automation
flag.What is the Expected behavior?
Test passing.
What is your public website URL? (or attach your complete example)
Not public/cannot share.
What is your TestCafe test code?
Your complete configuration file
Your complete test report
Screenshots
(screenshot 2 is darker because of browser debugger mode, so I could get the alert message to stay on screen long enough to take a screenshot)
Steps to Reproduce
--native-automation
flag, get failing test--native-automation
flag, get passing testTestCafe version
2.5.1-rc.1
Node.js version
v18.14.2
Command-line arguments
testcafe chrome .\tests\01-ui-and-authentication\ --hostname localhost -s takeOnFails=true --debug-on-fail --native-automation
Browser name(s) and version(s)
Chrome 112.0.0.0
Platform(s) and version(s)
Windows 11
Other
No response
The text was updated successfully, but these errors were encountered: