Chrome Automation Extension has crashed when trying to run protractor test - google-chrome

I am gaining experience with Protractor and am using the example test to see how it works. The test is located in xampp/htdocs/my-dev/test-automation-playground/poc-basic-integration-flow/node_modules/protractor/
In there we have a conf.js and an example_spec.js. To run the test, we enter the protractor folder using git bash, and type protractor conf.js.
When I try to run the example test provided by Protractor, my browser opens and I get the following error: Chrome Automation Extension has crashed.... See below:
And this is what it looks like in the browser:
I've looking into Chrome extensions and there is no such extension there. What could be causing this issue?

I simply start Git Bash without admin rights and I am not getting this error anymore. Also changing browser to Firefox in config resolves this issue most of the time.

Related

Disable log4net errors on command prompt while using rotractor/Selenium web driver/Chrome browser

Is there a way to completely disable log4net errors appearing on npm console while running test cases . I am using Protractor and Selenium Web driver. I would like to know if this is possible through Protractor's config file Capabilities.

Chrome headless screenshot on local machine

I have a localhost website created with ember which is just working fine.
I want to use Lighthouse to get some metrics about the performance over time. Of course I want this to be in Chrome and headless. I installed Lighthouse using NPM and run the following command:
lighthouse http://localhost:4200 -chrome-flags='--headless'
When running above, I got the following error resulting in a question mark as a performance metric:
Chrome didn't collect any screenshots during the page load. Please make sure there is content visible on the page, and then try re-running Lighthouse. (SPEEDINDEX_OF_ZERO)
I tried running the dist folder of ember with the http-server package, but no differences in the result. The same error occurs.
When I run the test against google.com or against a website in our test environment I get a result back and not the error. When a colleague is running it on his local machine, no error occurs. Only difference we can find is he is running win8.1 and my machine is win10.
When I run Chrome without the headless flagg I also get a result, but I need it to work headless.
I'm using all the latest versions of Lighthouse, Chrome, Windows10, node. Also tried Chromium but no differences.
Hopefully someone got an idea
After a week I tried again, still the same error. Now I tried again and it works. Nothing changed to my codebase and all apps, packs and so on are also the same version which I can see.
I don't know what fixed the issue, but it works now. Case closed.

Puppeteer authentication does not work in headless mode but yes in non headless mode

I'm facing up a strange problem in Puppeteer with authentication.
I've written a script to take some screenshot of a website which required authentication.
In my local computer (windows), when running in command line as node.exe my_script.js; it's working fine (in headless moden which is the default mode).
I've written an upper Java program to manipulate it (dynamically set the path, the node modules path, run the process "nodex.exe my_script.js" every 30minutes, manage timeout of the process,...). It's still working directly running from Eclipse, in headless mode.
Then... I've built/packaged a JAR and running it in a cmd window: java -jar my_jar.jar... and then the script can't authentitcated on the website in headless mode (the answser page just write a message like "you need to be authenticated", which is managed by the http server).
To check what happen, I've just add an option in my nodejs script (so I do not modify my java upper program code) to run chrome in non headless mode; with option headless : false. And... it's working!
I let the option to run in non headless mode, and I create a Windows service to run my jar via a bat file, with the help of nssm... Just to test. I'm really happy to see that all is running fine without seeing any chrome GUI (maybe Windows disable GUI for service, don't know how).
Have I maybe missed something? Or is there a bug in Puppeteer or Chrome to manage authentication in headless mode?
Regards
Alex

Running without the SUID sandbox! while running source code for Chrome

I download chromium source code and compiled according to the instruction as stated on their website.
Now when I tried to run the binary file for chrom in out/Debug/chrom
I am getting this error
[17144:17144:0423/112117:FATAL:browser_main_loop.cc(169)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
my chrome folder is in the /home/user/chromium/src ..
Solved this!
when you run out/Debug/chrom and some error like this comes you can run $out/Debug/chrom --no-sandbox
at least the chrome will work then!

Run Test Suite in Play 1.2.4

I am unable to run JUnit test suites in 1.2.4 since the command play test-only is not available. Please respond to the same in case there can be a fix for it without upgrading to higher versions of Play.
You can run your tests using the command:
play test
More information can be found here: http://www.playframework.com/documentation/1.2.4/test
Run your app in test mode:
play test
Then open the following URL:
http://localhost:9000/#tests
You'll be able to all, or individual, test classes to run. Unfortunately there's no way to run an individual test.
IDE:
If you are using an ide like eclipse you can run your junit tests from within the ide.
Command Line:
There are also the following two options for the command line:
Option 1:
play test
This runs the app in test mode. You can then run all tests via a browser interface available at:
http://localhost:9000/#tests (or your custom port if you changed it)
Option 2:
play auto-test
Runs the tests automatically without opening the browser.
Try using testOnly as the command, instead of test-only.