I am using Codecept with Playwright. The problem I am experiencing is that whenever I start my E2E Test, there is a default browser session launched. Is there a way to disable this default browser session as I want to create sessions manually, if and when needed
Related
I want to do full e2e with DB reset on each pre-commit on the local machine. So I trying to set up Cypress on the project with Gapi, which opens another browser window.
Is it even possible to take control of this process and get a valid g-token? Without the token, every API request will be failed.
I made an app that use socket.io.
It's time to put in production.
Before that, i want to remove or disable all socket.io error log in Client Side( the browser of user, So by inspecting console, he will not see the error).
Error is available at this link below
https://i.stack.imgur.com/PMDib.jpg
console['error'] = function(){}
did the job before all others scripts.
Thanks
Can a firefox or chrome extension use service workers? Attempting to install one via a content script doesn't seem to work
Failed to register/update a ServiceWorker for scope (url)
And installing one via a background script seems to be failing too:
Registration failed with SecurityError: The operation is insecure.
Is this possible?
The service worker is installed if the storage is enabled.
But the storage is disabled if this Firefox setting is enabled: Preferences / Cookies and Site Data / Delete cookies and site data when Firefox is closed
Please check the Mozilla ticket for details. Also you could test if the service worker works on the test page
I often would like to compare a new change with the original. To do this, I open two browser tabs of the same page, make a change, then reload one of the tabs to compare. With Browsersync enabled, this becomes impossible because both tabs automatically reload.
How can I disable Browsersync for a particular tab to prevent this from happening? I'm looking for a way to do this from the Javascript console, not having to stop/reload my watcher.
The Browsersync API has a pause() method, but I can't see a way to access this from an actual running Browsersync instance. There is a window.___browserSync___ object accessible, so there must be some way to achieve this.
The command should be:
window.___browserSync___.socket.disconnect();
If the ___browserSync___ object isn't available for some reason from the console try doing this in a fresh tab.
I'm attempting to use grunt-contrib-qunit to run a pre-existing suite of qunit tests (testing parsing of ajax request results) in headless mode with Phantom on Windows 8.
The tests complete fine in these scenarios:
When the remote page is accessed directly from any browser without Fiddler or another proxy running
When Phantom runs the tests from a command prompt with Fiddler open and running
Oddly if I don't have fiddler open monitoring the requests, the AJAX requests I'm testing never seem to initialize. I've checked my default IE LAN Settings and there is no proxy enabled, I've also tried flipping the Auto Detect Settings checkbox there and no change.
Any thoughts??
Details on my setup:
Node v0.10.4
Latest grunt-contrib-qunit
Windows 8
QUnit is divided into 4 or 5 modules with setup and teardown tasks in some modules, asynchronous and synchronous tests, and autorun is set to false.
Update:
If I turn off the options in Fiddler for "Reuse client connections" and "Reuse connections to servers" I seem to get the same failure behavior as when Fiddler is off. This led me to believe its a problem with connections being closed prematurely, so I tried setting a custom keep-alive header -- but it still errors out.
Update 2:
I still question this because the page itself loads fine, but the requests fail, but it looks like this could possibly be related to NTLM authentication. Fiddler might somehow facilitating the handshake. There is an open issue for NTLM on the Phantom github page.
Update 3:
After continued troubleshooting this evening it looks like the issue is only with authentication on POST requests. GET requests seem to work fine. I'm working around this for now by routing all requests through an ASHX handler and thus dropping the auth component. Only thing I had to change was to disable web security on phantom to allow the cross-domain requests through.
I was going to say you need to turn off security, which is done by passing --web-security=no to phantomjs. This will sort out the CORS issues. However I see in your Update#2 that you've already discovered this.
For the POST authentication problem, I blogged about the workaround here:
http://darrendev.blogspot.jp/2013/04/phantomjs-post-auth-and-timeouts.html
I've heard the most recent version has fixed this, so upgrading might be the actual answer?
BTW, be careful with auth in PhantomJS, as the auth details are sent on all requests. E.g. if your test page fetches JQuery from a CDN, the CDN will be sent your authentication headers. (SlimerJS has some new features in place for getting around this; AFAIK PhantomJS does not yet.)