We need to test a Polymer element in an HTTPS URL when we run $ wct, aka the Web Component Tester.
We're developing an element for screensharing, which requires a Chrome screensharing browser extension which only works on HTTPS.
We're aware that WCT uses Selenium under the hood so I was wondering:
Is there any way to run $ wct and provide it with some self-signed SSL certificates so it runs the tests under HTTPS?
Related
I've not been able to find straight forward instructions on how to avoid caching problems when developing a js app with vue cli.
For example, when we deploy a new version of the app with npm run build, we can see that a new app.xxxxx.js is deployed, where the xxxxxx part is a new hash that I guess webpack is generating.
We host this in an Windows 2012 IIS Server.
Now when I tell my customer we have solved the latest issues that have been found in the app, it seems that they have caching problems, as they still have the previous version, even if they close and reopen the browser.
Is there any way to avoid this behaviour?
Try to follow the below steps which help you to disable the cache in iis.
1)Open iis manager.
2)Select the site and click on the "HTTP response header feature".
3)Click on the set common header link from the action pane.
4)click the checkbox "expire web content" and select "immediately" radio button.
You could also set output caching in iis:
Configure IIS Output Caching
I am evaluating W3C pay Google examples by enabling the Chrome Extension from Google's example here: https://bobpay.xyz/ (Clicking "Install web payment app" on the bottom). This installs the W3C Pay Chrome extension.
I then use their demo here:
https://paymentrequest.show/demo/
I am able to submit a payment using the "Bobpay" extension, see below:
... however when it comes time to redirect to the Bob pay "Account Selector" web application (the front end of the Payment Handler), I get the following error in Chrome's Developer tools:
"Aborting payment handler window "https://bobpay.xyz/pay" because of navigation to an insecure url "chrome-extension://noojglkidnpfjbincgijbaiedldjfbhh/data/shared/tpc-check.html"
It's complaining that the redirection to the chrome-extension URL scheme is insecure.
I already took both Certs from bobpay.xyz and paymentrequest.show sites, and installed them to my System keychain. Then I trusted both SSL certs. This didn't help.
BTW, this works on Windows, but not on MacOS (Chrome on both).
Also: submitting a sample credit card payment outside of the Bobpay extension works fine (by using a locally stored Credit card option, and not the Bobpay extension) - returns tokenized card to be forwarded to payment processor.
This demo code also does not work on any other browsers, such as Firefox or Safari (unsupported on both).
In the Security panel of Chrome Developer tools, we can also see that the Chrome Extension for Bobpay is marked as "Unsecure":
I also installed the whole thing on Localhost, created a self signed SSL cert, added it to keychain, trusted it, and ran an https-server with that cert, but I get the same issue on https://localhost:8080/bobpay as well.
After verifying that the demo worked on another MacOS machine, I figured I introduced an issue trying to clone bobpay and deploy it on localhost under another name. The two payment handlers were somehow trampling over each other, when redirecting to the Frontend Handler page.
I ended up removing all Chrome files in ~/Library/Application Support/Google/Chrome, clearing all Chrome settings (reset to default), and re-installing Chrome. This cleaned out all extensions, cached data, and service workers under Dev Console --> Application. I am now able to proceed without errors.
I am trying to get started on debugging my Polymer application. I have hand crafted it by copying what I think the PolymerCLI Polymer init does.
I am not sure what is loading service worker. The default one for development just does a console.info() call saying its been disabled for development.
When I use Polymer serve to serve my application on localhost: 8080, I get the console.info message, despite there being nowhere where I actually load the file service-worker.js . Because the application is much more complex (and I am trying to use http/2) I have my own node based server as well. When I run that and then fetch my application in the browser, service-worker.js does not get loaded and run.
What is Polymer serve doing to enable it?
It could be that a different application which used the same source (e.g. localhost:8080) registered and installed a service worker.
Open up the Application panel in Chrome Canary to inspect / delete the service worker.
If you can't access Chrome Canary, open chrome://serviceworker-internals, find the scope that matches your app, and click Unregister. There's also an option at the top of serviceworker-internals which lets you open a DevTools window and pause JS on the SW. Enable that option and you'll be able to see which SW is running.
I'm using Chrome in a Docker container (published by SeleniumHQ) to run automated tests in the Cloud. This runs a minimal display environment on XVFB that you can VNC into to see results.
Now we're using this within a Corporate firewall - and so external requests need to go through a proxy. We're setting the proxy with the Selenium proxy command.
Now we've run a test on the command line with curl on the Chrome docker container and curl with the proxy can access external resources just fine. But Chrome has an unknown problem accessing external resources (internal are fine). When we try and look at the settings, it is locked out. (Something about not being about the render the settings on xvfb).
So I'm looking for a way to look at the settings similar to Firefox's about:config. Now obviously this doesn't work on Chrome, but there appear to be some similar things.
There appear to be some details on URLs to use here.
They suggest:
chrome://net-internals/proxyservice#events
chrome://net-internals/proxyservice.config#events
chrome://net-internals/proxyservice.init_log#events
chrome://net-internals/proxyservice.bad_proxies#events
My question is: How to view Chrome settings on XVFB?
One way to see the current preferences is to open the file scoped_dir5752_14079\Default\Preferences in the temporary folder once the session is started.
And for a list and description of the preferences :
https://chromium.googlesource.com/chromium/src/+/master/chrome/common/pref_names.cc
I'm developing a native iOs app using cordova to do the native stuff, so I can focus on html/javascript and css. However, I need to make cross-domain ajax calls, which is fine in my native app, but not when I run my project in Chrome. So I would like to disable this security feature in Chrome so I can test my app. Is there an easy way to do this ?
Cheers
Given you are developing an iOS app I assume you are on OSX in which case you can essentially launch Chrome with XXS enabled be executing the following command line:
open -a "Google Chrome" --args --disable-web-security
In fact, I use it so often I added an alias in my .bash_profile:
alias chrometest='open -a "Google Chrome" --args --disable-web-security'
This has been working for me for quite some time all the way up to my current version of Chrome: 38.0.2125.104
Of course you can name it whatever you like…good luck!!!
You can do jsonp for your cross domain requests.
Or another trick is modifying the server headers to allow cross site ajax.
Access-Control-Allow-Origin: *
From cors