Does Google allow to load its libraries on a headless browsers? I am running tests with PhantomJS but they are failing because it Can't find the variable: google, but if I run the tests in Chrome they all pass.
Yes, Google JavaScript libraries run1 on PhantomJS. It's the way they come to PhantomJS that's troubling sometimes. Most web servers disabled support for SSL v3 because of the POODLE vulnerability, but PhantomJS <1.9.8 uses it as a default.
You either need to pass the --ssl-protocol=tlsv1 --ignore-ssl-errors=true commandline flags to PhantomJS when you run it or you can update to a newer version such as 1.9.8 or 2.0.0.
1 That's not exactly true, since PhantomJS 1.x also doesn't implement Function.prototype.bind which many web sites use and which might stop the execution of some JavaScript.
Related
I like to run my karma unit tests on a headless chrome. Using karma-chrome-launcher and setting the browser to "ChromeHeadless" works on my machine. But on the CI server it fails with the message "No binary for ChromeHeadless browser on your platform."
Installing chrome on the CI machine is not possible. Is there another way to load the chrome binaries?
for example the google puppeteer module seems to load that when run. from the docs: "Puppeteer downloads and uses a specific version of Chromium". How can i achieve the same?
You can use Puppeteer (headless Chromium), follow these instructions.
If what you fear is that download from the internet might be slow, you can tell puppeteer where to download chrome from and use a local address.
Use PUPPETEER_DOWNLOAD_HOST to specify where to download Chrome from and PUPPETEER_SKIP_CHROMIUM_DOWNLOAD to skip downloading Chrome altogether.
You can read more about this in the documentation.
I need to build in my pepper plugin in chromium source code for building browser with already installed plugin. Is there possibility to do that?
A handful of plugins are built in. Since these are plugins, they are built independently from Chrome and loaded dynamically rather than directly linked to the Chromium executable. This is the function that causes them to be loaded into Chromium:
https://code.google.com/p/chromium/codesearch#chromium/src/chrome/common/chrome_content_client.cc&rcl=1436599777&l=118
The NaCl plugin is special, since it runs "in process", which means it is loaded into the renderer process. Eventually, support for this kind of plugin will be eliminated, so it is best to follow the pattern of the "out of process" plugins, which run in their own process, such as PDF.
I want to run some test using selenium standalone server on Google Chrome but i need to pass some ChromeOptions to the chrome driver from command line
Anybody has an idea of how can i do that?
Selenium Core, which is what you are referring to, was released before Chrome existed. Support for Chrome was added later. What you are asking for was never supported, and with Selenium Core deprecated several years back, it will probably never be supported.
One possible workaround is to set the desired options in the Chrome profile.
Another options, although much more painful, is to move up to Selenium WebDriver.
Chrome 32 has blocked NPAPI for extension development.
I wonder if there is any workaround for enable this feature in Chrome, like some settings or launch args.
The only thing that should have changed for extensions so far is that you can't post new extensions that include NPAPI plugins to the store. There's no setting or flag that you can use locally that would make the store policy not apply to you.
If you are seeing plugins in existing extensions not working correctly in 32, you should file a bug.
Since the latest release of Google Chrome browser version 21.* and Selenium Chrome Driver version 22.* , the special command line switch “--disable-web-security” which we have been using to test our iframes with different domain is no longer supported (deprecated).Is there any workaround for the same to automate our frame which is in different domain in Chrome browser?
Our existing functional Automation framework completely depends on this switch (--disable-web-security).Response would be appreciated.
You don't need a workaround, the flag still works, what's new is the warning.
I just performed a test using jQuery to send an AJAX request to another domain and it worked using the command-line flag, and it didn't when not using it.
It would be nice to have a way to disable the "yellow infobar", though.
(I'm running Chrome 21.0.1180.60).
You might also have to kill all running instances of the Chrome.exe running in the background before using the flag.
Yes. What turned out to be the issue is even after you close chrome... there is a chrome.exe process running. Kill it using taskmanager and the flag will work even in version 28