-
Notifications
You must be signed in to change notification settings - Fork 184
Testcafe does not respect base tag #1965
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
Comments
I was not able to reproduce the issue. I prepared a sample project. Please check the attached file. |
Hey @AlexKamaev |
Thank you @mbazalik |
What is your Test Scenario?
My application at some point injects
<base>
tag into website and after that creates a new<script>
tag with relative src. Testcafe does not respect the value of base tag when injecting the<script>
tagWhat is the Current behavior?
For example sets
<base href="http://localhost:8080/chapters/de/auth/">
and injects<script src="build.js" type="text/javascript" />
resulting into browser downloading script fromhttp://localhost:8080/chapters/de/auth/build.js
.When running the same application in testcafe, the result is slightly different. Inserted base is
<base href-hammerhead-stored-value="http://localhost:8080/chapters/de/auth/" href="http://localhost:1337/Lj6CFUfNF/http://localhost:8080/chapters/de/auth/">
and script is<script src-hammerhead-stored-value="build.js" src="http://localhost:1337/Lj6CFUfNF!s!utf-8/http://localhost:8080/account/build.js" type="text/javascript" />
Suddenly the previously relative url build.js turned into
http://localhost:8080/account/build.js
which is inconsistent with what is set inWhat is the Expected behavior?
I would expect the injected script tag to be
<script src-hammerhead-stored-value="build.js" src="http://localhost:1337/Lj6CFUfNF!s!utf-8/http://localhost:8080/chapters/de/auth/build.js" type="text/javascript" />
What is your web application and your TestCafe test code?
I am sorry, there is no sample url available at the moment
Your Environment details:
The text was updated successfully, but these errors were encountered: