Self.location on Worker returns the testcafe proxy url
See original GitHub issueWhat is your Test Scenario?
We are making tests over a product which uses workers. One of which fetches an url with a location grabbed by self.location.origin.
What is the Current behavior?
As testcafe works over the proxy, that self.location.origin returns the testcafe proxy url and not the host of where the website is at. I believe testcafe overrides most window.location methods to return the real host of where the page is located, but it seems self.location were not overriden.
What is the Expected behavior?
self.location.origin should return the real hosts origin where the testing page is being tested.
Your Environment details:
- testcafe version: 1.7.0
- node.js version: 8.16
- command-line arguments:
- browser name and version: Chrome 83
- platform and version: Mac & Saucelabs Windows 10
- other:
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to remove hostname and port (added by testcafe ... - GitHub
I am using wifi and the Proxy server is off on my machine. So you mean the application will have 2 URLs: Testcafe...
Read more >Configuration File | API | Docs - TestCafe
Location. On startup, TestCafe looks for a configuration file ( .testcaferc.js or .testcaferc.json ) in the current working directory.
Read more >Command Line Interface | API | Docs - TestCafe
TestCafe displays URLs you should open in browsers on your remote device. ... only for installed and portable browsers located on the current...
Read more >FAQ - TestCafe
TestCafe uses a URL-rewriting proxy which allows it to work without the WebDriver. This proxy injects the driver script that emulates user actions...
Read more >Client Functions and Script Injection for Page Interaction
The test code runs in a Node.js process (server) and uses a proxy server to interact with the browser (client). TestCafe's client-server ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve reproduced the issue. It looks like we don’t override WorkerLocation. Thank you for bringing this issue to our attention.
For team:
Steps for reproducing the issue:
ServiceWorkerGlobalScope
instance withWorkerLocation
properties that are not overwritten:This is the repository with the code.
Hello,
Thank you for the update and for creating an issue for the bug you found. We appreciate your contribution.